Documentation for method raku
assembled from the following pages:
Class: Mu §
From Mu
(Mu) method raku §
multi method raku(Mu:)multi method raku(Mu:)
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)»
Class: Complex §
From Complex
(Complex) method raku §
Defined as:
method raku(Complex: --> Str)
Returns an implementation-specific string that produces an equivalent object when given to EVAL.
say (1-3i).raku; # OUTPUT: «<1-3i>»
Class: Allomorph §
From Allomorph
(Allomorph) method raku §
multi method raku(Allomorph:)
Return a representation of the object that can be used via EVAL
to reconstruct the value of the object.
Class: IO::Path §
From IO::Path
(IO::Path) method raku §
Defined as:
method raku(IO::Path: --> Str)
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.
Class: IO::Path::Cygwin §
From IO::Path::Cygwin
(IO::Path::Cygwin) method raku §
Defined as:
method raku(IO::Path::Cygwin: --> Str)
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.
Class: IO::Path::QNX §
From IO::Path::QNX
(IO::Path::QNX) method raku §
Defined as:
method raku(IO::Path::QNX: --> Str)
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.
Class: IO::Path::Unix §
From IO::Path::Unix
(IO::Path::Unix) method raku §
Defined as:
method raku(IO::Path::Unix: --> Str)
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.
Class: IO::Path::Win32 §
From IO::Path::Win32
(IO::Path::Win32) method raku §
Defined as:
method raku(IO::Path::Win32: --> Str)
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.
Class: FatRat §
From FatRat
(FatRat) method raku §
multi method raku(FatRat: --> Str)
Returns an implementation-specific string that produces an equivalent object when given to EVAL.
say FatRat.new(1, 2).raku; # OUTPUT: «FatRat.new(1, 2)»
Class: Junction §
From Junction
(Junction) method raku §
Defined as:
multi method raku(Junction:)
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")»
Class: Rat §
From Rat
(Rat) method raku §
multi method raku(Rat: --> Str)
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»
Class: Range §
From Range
(Range) method raku §
Defined as
multi method raku(Range:)
Returns an implementation-specific string that produces an equivalent object when given to EVAL.
say (1..2).raku # OUTPUT: «1..2»