NAME
FP::Path
SYNOPSIS
use FP::Equal;
use FP::Path;
my $p = FP::Path->new_from_string ("a/../b/C")
->add(FP::Path->new_from_string("../d/../e"), 0);
is $p->string, 'a/../b/C/../d/../e';
is $p->xclean->string, 'b/e';
ok not equal($p->xclean, $p);
ok equal($p->xclean, $p->xclean); # obviously, assuming purity
# or use the (evil?) constructor function export feature:
use FP::Path "path";
is 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
Implements: FP::Abstract::Show, FP::Abstract::Pure
FP::Path::t for the test suite
NOTE
This is alpha software! Read the status section in the package README or on the website.