Subject: | Relative parents in directories incorrect |
perl -MPath::Class -e '
$x = file("bin/process-site");
for (1..6) {
print "Relative: $x\n";
$x = $x->parent;
}'
Relative: bin/process-site
Relative: bin
Relative:
Relative: /
Relative: /
Relative: /
Obviously, this is a deviation from both the documentation and desired result.
The behavior doesn't occur if you use dir() instead of file() to construct the initial object.
Cheers,
Sterling