WHICH
ErrorsCollection

WHICH

Synthesised documentation from type/Range type/Mu type/IO/Special type/Allomorph

From type/Range

See Original text in context

multi method WHICH (Range:D:)

This returns a string that identifies the object. The string is composed by the type of the instance (Range) and the min and max attributes:

say (1..2).WHICH # OUTPUT: «Range|1..2␤»

From type/Mu

See Original text in context

multi method WHICH(--> ObjAt:D)

Returns an object of type ObjAt which uniquely identifies the object. Value types override this method which makes sure that two equivalent objects return the same return value from WHICH.

say 42.WHICH eq 42.WHICH;       # OUTPUT: «True␤»

From type/IO/Special

See Original text in context

method WHICH(IO::Special:D: --> Str)

This returns a string that identifies the object. The string is composed by the type of the instance (IO::Special) and the what attribute:

$*IN.path.what;  # OUTPUT: «<STDIN>␤» 
$*IN.path.WHICH# OUTPUT: «IO::Special<STDIN>␤»

From type/Allomorph

See Original text in context

multi method WHICH(Allomorph:D:)

Returns an object of type ValueObjAt which uniquely identifies the object.

my $f = <42.1e0>;
say $f.WHICH;     # OUTPUT: «NumStr|Num|42.1|Str|42.1e0␤»