Skip Menu |

This queue is for tickets about the PathTools CPAN distribution.

Report information
The Basics
Id: 52855
Status: open
Priority: 0/
Queue: PathTools

People
Owner: Nobody in particular
Requestors: albert.q.perl [...] gmail.com
jkeenan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: a bug in Cwd
Date: Thu, 17 Dec 2009 16:55:02 +0800
To: bug-PathTools [...] rt.cpan.org
From: Albert Q <albert.q.perl [...] gmail.com>
perl v5.10.0 Cwd $VERSION = '3.2501'; in /home/albert abs_path "testfolder" returns /home/albert/testfolder abs_path "../testfolder" returns undef abs_path "testfolder/a" returns undef /home/albert/testfolder /home/testfolder and /home/albert/testfolder/a are all invalid path but if the parameter passed to abs_path does not contain "/", it will return the concatenated path directly without checking existence. -- missing the days we spend together
On Thu Dec 17 03:55:28 2009, albert.q.perl@gmail.com wrote: Show quoted text
> perl v5.10.0 > Cwd $VERSION = '3.2501'; > > in /home/albert > > abs_path "testfolder" returns /home/albert/testfolder > abs_path "../testfolder" returns undef > abs_path "testfolder/a" returns undef > > /home/albert/testfolder /home/testfolder and > /home/albert/testfolder/a are all invalid path > but if the parameter passed to abs_path does not contain "/", it will return > the concatenated path directly without checking existence. > > >
The behavior of Cwd::abs_path() appears to have changed somewhat since this ticket was originally filed. From blead roughly 2013-11-23: ##### $ ./perl -Ilib -MCwd=abs_path -wE 'say abs_path("testfolder")' /home/jkeenan/perl/testfolder $ ./perl -Ilib -MCwd=abs_path -wE 'say abs_path("../testfolder")' /home/jkeenan/testfolder $ ./perl -Ilib -MCwd=abs_path -wE 'say abs_path("testfolder/a")' Use of uninitialized value in say at -e line 1. #####