Is it correct that File::Spec::VMS->canonpath('[]') returns ''? This is an
explicit clause in File::Spec::VMS::canonpath().
$path =~ s/\[\]// unless $path eq '[]'; # [] ==>
No other File::Spec variation does this, they all return the equivalent cwd.
This makes File::Spec->canonpath( File::Spec->curdir ) difficult to use as now
you have to carefully distinguish between false and undefined to see an error.
Can that clause be removed so it returns '[]'?
On a related note, unlike all the other File::Spec variants
File::Spec->catdir('', 'some', 'dir') does not produce an absolute path. It
does the opposite and produces a relative one. In fact, I can't see how to
make an absolute path on VMS with catdir().
While changing this could be seen as breaking compatibility, the catdir()
behavior is tested in t/Spec.t, these differences in behavior add to the
difficulty of writing portable code for VMS. I'd see making writing
compatible code easier a greater priority than maintaining a historical
incompatibility.
--
24. Must not tell any officer that I am smarter than they are, especially
if it’s true.
-- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
http://skippyslist.com/list/