The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Evo::Path

VERSION

version 0.0405

SYNOPSIS

  say Evo::Path->from_string('a/b',    '/base');     # /base/a/b
  say Evo::Path->from_string('/a/b//', '/base/');    # /base/a/b

  my $path = Evo::Path->from_string('part', '/base');
  say $path->append('foo/bar');                      # /base/part/foo/bar
  say $path->append('/foo/bar/');                    # /base/part/foo/bar
  say $path->append_unsafe('/foo/../bar');           # /base/part/foo/../bar

METHODS

append

Append child path to the current and return a new Evo::Path instance with the same base. This functions should protect you from file traverse vulnerabilities

append_unsafe

Like append, but don't protect from .. parts in path

AUTHOR

alexbyk.com

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by alexbyk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.