Subject: | File::Spec->abs2rel() provides an incorrect answer in some cases |
MIME-Version: | 1.0 |
X-Mailer: | MIME-tools 5.418 (Entity 5.418) |
Content-Type: | text/plain; charset="utf8" |
Content-Disposition: | inline |
Content-Transfer-Encoding: | binary |
X-RT-Original-Encoding: | utf-8 |
Content-Length: | 793 |
In PathTools 3.09, File::Spec->abs2rel('.', '.') returns "", which isn't
exactly a relative path, but could be considered to be correct I guess.
In PathTools 3.24, the same call returns "/", no matter what your cwd
is. This is definitely wrong - it's not even returning a relative path.
beranej1@jberanek /tmp
$ perl -MFile::Spec -e "print File::Spec->VERSION;"
3.24
beranej1@jberanek /tmp
$ perl -MFile::Spec -e "print File::Spec->abs2rel('.','.');"
/
beranej1@jberanek /tmp
$ perl -v
This is perl, v5.8.8 built for x86_64-linux-thread-multi
beranej1@jberanek /tmp
$ cat /etc/redhat-release
Fedora Core release 6 (Zod)
beranej1@jberanek /tmp
$ uname -a
Linux jberanek.saltaire.pace.co.uk 2.6.19-1.2895.fc6 #1 SMP Wed Jan 10
18:50:56 EST 2007 x86_64 x86_64 x86_64 GNU/Linux
====
John.