Subject: | Doc inconsistency in Path::Class::File from Path-Class-0.26 (pasto from Path::Class::Dir??) |
Date: | Sat, 8 Dec 2012 12:24:34 -0000 |
To: | bug-Path-Class [...] rt.cpan.org |
From: | "Pau Amma" <pauamma [...] gundo.com> |
In the code examples for file() and Path::Class::File->new, in the METHODS
section:
my $dir = file( 'foo', 'bar', 'baz.txt' );
my $dir = dir( 'foo/bar/baz.txt' );
my $dir = dir( 'foo/bar', 'baz.txt' );
my $dir = dir( '/var/tmp/foo.txt' );
my $dir = dir( '', 'var', 'tmp', 'foo.txt' );
...
$dir->resolve
Performs a physical cleanup of the file path. For instance:
my $dir = dir('/foo/baz/../foo.txt')->resolve;
# $dir now represents '/foo/foo.txt', assuming no symlinks
$dir should probably be $file in all of those, and dir( ... ) file( ... )
in the last 5.
(I might have missed other instances in the doc)