Last active
May 18, 2016 19:42
-
-
Save dogbert17/5c943bf4448a2ca8f5182ed48a950ac7 to your computer and use it in GitHub Desktop.
Trying to document IO::Path methods 'parent' and 'child'
This file contains hidden or 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 | |
method child(IO::Path:D: $childname --> IO::Path) | |
Appends C<$childname> to the end of the path, adding path separators where | |
needed and returns the result as a new C<IO::Path>. | |
my $io = IO::Path.new( "/bin" ); | |
say $io.child('netstat'); # "/etc/netstat".IO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment