Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Last active May 18, 2016 19:42

Revisions

  1. dogbert17 revised this gist May 18, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    method parent(IO::Path:D: --> IO::Path)

    Removes the last portion of the path and returns the result as a new C<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
  2. dogbert17 revised this gist May 18, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -14,5 +14,5 @@ Removes the last portion of the path and returns the result as a new C<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" );
    my $io = IO::Path.new( "/bin" );
    say $io.child('netstat'); # "/etc/netstat".IO
  3. dogbert17 created this gist May 18, 2016.
    18 changes: 18 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    =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