This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method put | |
method put(IO::Socket:D: Str(Cool) $string) | |
Writes the supplied string, with a C<\n> appended to it, | |
to the socket, thus sending it to other end of the connection. | |
Fails if the socket is not connected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method parent | |
method parent(IO::Path:D: --> IO::Path) | |
Removes the last portion of the path, and returns the result as a new C<IO::Path>. | |
my $io = IO::Path.new( "/etc/passwd" ); | |
say $io.parent; # "/etc".IO | |
=head2 method child |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method IO | |
method IO(IO::Path:D: --> IO::Path) | |
Returns the invocant. | |
=head2 method SPEC | |
method SPEC(IO::Path:D: --> IO::Spec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method resolve | |
method resolve(IO::Path:D: --> IO::Path) | |
Returns a new C<IO::Path> object with all symbolic links and references to the | |
parent directory (C<..>) are physically resolved. This means that the | |
filesystem is examined for each directory in the path, and any symlinks found | |
are followed. | |
# bar is a symlink pointing to "/baz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin pod | |
=TITLE class X::Temporal::InvalidFormat | |
=SUBTITLE Error due to using an invalid format when creating a DateTime or Date | |
class X::Temporal::InvalidFormat does X::Temporal is Exception { } | |
This exception is thrown when code tries to create a C<DateTime> or C<Date> object | |
using an invalid format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 routine isa | |
multi method isa(Mu $type) returns Bool:D | |
multi method isa(Str:D $type) returns Bool:D | |
Returns C<True> if the invocant is an instance of class C<$type>, a subset type or a derived class (through inheritance) of C<$type>. | |
my $i = 17; | |
say $i.isa("Int"); # True | |
say $i.isa(Any); # True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method floor | |
Defined as: | |
method floor(Complex:D:) returns Complex:D | |
Usage: | |
COMPLEX.floor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method abs | |
Defined as: | |
method abs(Complex:D:) returns Num:D | |
multi sub abs(Complex:D $z) returns Num:D | |
Usage: | |
COMPLEX.abs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method default | |
Defined as: | |
method default returns ??? # what should be written here | |
Usage: | |
Hash.default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method keyof | |
Defined as: | |
method keyof | |
Usage: | |
Hash.keyof |