Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zoffixznet/a214216441c8f6e59d6d64184acbf57f to your computer and use it in GitHub Desktop.
Save zoffixznet/a214216441c8f6e59d6d64184acbf57f to your computer and use it in GitHub Desktop.
Trying to document IO::Path methods 'parent' and 'child'
=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( "/etc" );
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