raku
ErrorsCollection

raku

Synthesised documentation from type/FatRat type/IO/Path/QNX type/IO/Path/Cygwin type/IO/Path type/Range type/Mu type/Rat type/IO/Path/Unix type/Allomorph type/Complex type/Junction type/IO/Path/Win32

From type/FatRat

See Original text in context

multi method raku(FatRat:D: --> Str:D)

Returns an implementation-specific string that produces an equivalent object when given to EVAL.

say FatRat.new(12).raku# OUTPUT: «FatRat.new(1, 2)␤» 

From type/IO/Path/QNX

See Original text in context

method raku(IO::Path::QNX:D: --> Str:D)

Returns a string that, when given passed through EVAL gives the original invocant back.

IO::Path::QNX.new("foo/bar").raku.say;
# OUTPUT: IO::Path::QNX.new("foo/bar", :CWD("/home/camelia")) 

Note that this string includes the value of the .CWD attribute that is set to $*CWD when the path object was created, by default.

From type/IO/Path/Cygwin

See Original text in context

method raku(IO::Path::Cygwin:D: --> Str:D)

Returns a string that, when given passed through EVAL gives the original invocant back.

IO::Path::Cygwin.new("foo/bar").raku.say;
# OUTPUT: IO::Path::Cygwin.new("foo/bar", :CWD("/home/camelia")) 

Note that this string includes the value of the .CWD attribute that is set to $*CWD when the path object was created, by default.

From type/IO/Path

See Original text in context

method raku(IO::Path:D: --> Str:D)

Returns a string that, when given passed through EVAL gives the original invocant back.

"foo/bar".IO.raku.say;
# OUTPUT: IO::Path.new("foo/bar", :SPEC(IO::Spec::Unix), :CWD("/home/camelia")) 

Note that this string includes the value of the .CWD attribute that is set to $*CWD when the path object was created, by default.

From type/Range

See Original text in context

multi method raku(Range:D:)

Returns an implementation-specific string that produces an equivalent object when given to EVAL.

say (1..2).raku # OUTPUT: «1..2␤» 

From type/Mu

See Original text in context

multi method raku(Mu:U:)
multi method raku(Mu:D:)

For type objects, returns its name if .raku has not been redefined from Mu, or calls .raku on the name of the type object otherwise.

say Str.raku;          # OUTPUT: «Str␤»

For plain objects, it will conventionally return a representation of the object that can be used via EVAL to reconstruct the value of the object.

say (1..3).Set.raku;  # OUTPUT: «Set.new(1,2,3)␤»

From type/Rat

See Original text in context

multi method raku(Rat:D: --> Str:D)

Returns an implementation-specific string that produces an equivalent object when given to EVAL.

say (1/3).raku;                # OUTPUT: «<1/3>␤» 
say (2/4).raku;                # OUTPUT: «0.5␤» 

From type/IO/Path/Unix

See Original text in context

method raku(IO::Path::Unix:D: --> Str:D)

Returns a string that, when given passed through EVAL gives the original invocant back.

IO::Path::Unix.new("foo/bar").raku.say;
# OUTPUT: IO::Path::Unix.new("foo/bar", :CWD("/home/camelia")) 

Note that this string includes the value of the .CWD attribute that is set to $*CWD when the path object was created, by default.

From type/Allomorph

See Original text in context

multi method raku(Allomorph:D:)

Return a representation of the object that can be used via EVAL to reconstruct the value of the object.

From type/Complex

See Original text in context

method raku(Complex:D: --> Str:D)

Returns an implementation-specific string that produces an equivalent object when given to EVAL.

say (1-3i).raku;                # OUTPUT: «<1-3i>␤»

From type/Junction

See Original text in context

multi method raku(Junction:D:)

Collapses the Junction and returns a Str composed of raku of its components that evaluates to the equivalent Junction with equivalent components:

<a 42 c>.all.raku.put# OUTPUT: «all("a", IntStr.new(42, "42"), "c")␤»

From type/IO/Path/Win32

See Original text in context

method raku(IO::Path::Win32:D: --> Str:D)

Returns a string that, when given passed through EVAL gives the original invocant back.

IO::Path::Win32.new("foo/bar").raku.say;
# OUTPUT: IO::Path::Win32.new("foo/bar", :CWD("C:\\Users\\camelia")) 

Note that this string includes the value of the .CWD attribute that is set to $*CWD when the path object was created, by default.