Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Last active May 18, 2016 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dogbert17/5c943bf4448a2ca8f5182ed48a950ac7 to your computer and use it in GitHub Desktop.
Save dogbert17/5c943bf4448a2ca8f5182ed48a950ac7 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( "/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