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

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

Thread Previous | Thread Next
Ben Morrow
June 12, 2008 20:03
Re: Cwd::abs_path behavior with non-existant paths
Message ID:

Quoth ("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')" 
~% 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.


I touch the fire and it freezes me,                      []
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About