The Wayback Machine - https://web.archive.org/web/20160304205619/http://doc.perl6.org:80/routine/gist

Documentation for routine gist

Documentation for routine gist, assembled from the following types:

class Mu

From Mu

routine gist

multi sub    gist(Mu) returns Str
multi method gist()   returns Str

Returns a string representation of the invocant, optimized for fast recognition by humans.

The default gist method in Mu re-dispatches to the perl method for defined invocants, and returns the type name in parenthesis for type object invocants. Many built-in classes override the case of instances to something more specific that may truncate output.

gist is the method that say calls implicitly, so say $something and say $something.gist generally produce the same output.

say Mu.gist;        # (Mu)
say Mu.new.gist;    # Mu.new()

class Exception

From Exception

method gist

Defined as:

multi method gist(Exception:D:)

Usage:

EXCEPTION.gist

Returns whatever the exception printer should produce for this exception. The default implementation returns message and backtrace separated by a newline.

class Date

From Date

method gist

Defined as:

multi method gist(Date:D:) returns Str:D

Usage:

DATE.gist

Returns the date in YYYY-MM-DD format (ISO 8601)

class Nil

From Nil

method gist

method gist() returns Str:D

Returns "Nil".

Morty Proxy This is a proxified and sanitized view of the page, visit original site.