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

Cwd::abs_path behavior with non-existant paths

Thread Next
John E. Malmberg
June 12, 2008 19:19
Cwd::abs_path behavior with non-existant paths
Message ID:
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')"

On VMS, this this routine is doing syntax only lookup.  What I am 
looking at doing is implementing it so that it actually does a lookup of 
the file.

On UNIX, the foo/non-existant.file returns nothing, but the other two 
return the same as the input.

The routines on VMS to do a realpath input will only work on existing 
files, so I need to know the expected / intended behavior for 
non-existent files.

Personal Opinion Only

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About