develooper Front page | perl.perl5.porters | Postings from June 2008

Re: Cwd::abs_path behavior with non-existant paths

Thread Previous | Thread Next
From:
Ben Morrow
Date:
June 12, 2008 20:03
Subject:
Re: Cwd::abs_path behavior with non-existant paths
Message ID:
vv39i5-er91.ln1@osiris.mauzo.dyndns.org

Quoth wb8tyw@qsl.net ("John E. Malmberg"):
> Before the 5.10 release, we were working on implementing an interface to 
> realpath() on VMS.
> 
> We discovered that the VMS behavior for non-existant paths was different 
> than on other platforms.
> 
> To get a fair sampling, could this test be run on a number of different 
> platforms to see what the consensus on the proper behavior should be.
> 
> perl -mCwd -e "print Cwd::abs_path('foo/non-existant.file')"
> 
> perl -mCwd -e "print Cwd::abs_path('/foo/non-existant.file')"
> 
> perl -mCwd -e "print Cwd::abs_path('non-existant.file')"

~% perl -v

This is perl, v5.8.8 built for i386-freebsd-64int
[...]
~% perl -mCwd -le"print Cwd::abs_path('/foo/non-existant.file')" 

~% perl -mCwd -le"print Cwd::abs_path('foo/non-existant.file')" 

~% perl -mCwd -le"print Cwd::abs_path('non-existant.file')" 
/home/mauzo/non-existant.file
~% perl -mCwd -le"print Cwd::_perl_abs_path('/foo/non-existant.file')"
stat(/foo/non-existant.file): No such file or directory at -e line 1

~%

Same results with 5.10.0.

Ben

-- 
I touch the fire and it freezes me,                      [ben@morrow.me.uk]
I look into it and it's black.
Why can't I feel? My skin should crack and peel---
I want the fire back...                     BtVS, 'Once More With Feeling'

Thread Previous | 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