NAME
FP::Path
SYNOPSIS
use FP::Path;
my $p= FP::Path->new_from_string ("a/../b/C")->add
(FP::Path->new_from_string("../d/../e"), 0);
$p->string # 'a/../b/C/../d/../e'
$p->xclean->string # 'b/e'
$p->xclean->equals($p) # ''
$p->xclean->equals($p->xclean) # 1
# or use the (evil?) constructor function export feature:
use FP::Path "path";
path("a/../b/C")->xclean->string # "b/C"
DESCRIPTION
Not really sure why I'm creating something from scratch here? It might be cleaner:
This doesn't do I/O (access the file system, ask the system for the hostname, etc.), and it doesn't resolve ".." unless when told to (`perhaps_clean_dotdot` and derived methods (incl. `xclean` etc.)).
TODO
Port / merge with https://github.com/pflanze/chj-schemelib/blob/master/cj-posixpath.scm ?
Provide `string_to_path` constructor function?
SEE ALSO
FP::Path::t for the test suite