develooper Front page | perl.perl5.porters | Postings from August 2001

Re: bug in File::Spec 0.82 (canonpath)

Thread Next
From:
Barrie Slaymaker
Date:
August 9, 2001 10:46
Subject:
Re: bug in File::Spec 0.82 (canonpath)
Message ID:
20010809134614.F4511@jester.slaysys.com
That is odd.  I'll add it to the test suite and patch it.  Thanks for
the report.

- Barrie

On Thu, Aug 09, 2001 at 01:41:21PM -0400, David Boyce wrote:
> Barrie,
> 
> I believe I've run across a bug - at the very least a bewildering 
> phenomenon - in File::Spec 0.82. The canonpath method will not strip a "/." 
> off a directory though it will strip similar artifacts. And the 
> documentation states quite clearly that /. is stripped. Here's a test script:
> 
> % cat ~/pl/canonpath.pl
> use Cwd;
> use File::Spec 0.82;
> my $cwd = getcwd;
> for ($cwd, "$cwd/", "$cwd/.", "$cwd/./") {
>      print File::Spec->canonpath($_), "\n";
> }
> 
> And here's a test run:
> 
> % perl  /data/home/dsb/pl/canonpath.pl
> /tmp
> /tmp
> /tmp/.			<= This one is wrong!
> /tmp
> 
> Thanks,
> David Boyce
> 
> 

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About