develooper Front page | perl.module-authors | Postings from October 2005

RFC: Long path name support on VMS issue.

John E. Malmberg
October 18, 2005 02:50
RFC: Long path name support on VMS issue.
Message ID:
With 64 bit OpenVMS 7.2, The OpenVMS ODS-5 file system can support paths 
as long as 4096 characters long.

Perl on VMS is currently limited in most places to paths that are only 
255 characters long.

I am looking at removing that restriction on 64 bit OpenVMS.

The issue that comes up is that while the file system can handle the 
longer pathnames, the DCL shell and some utilities / system calls can 
not.  These utilities can generally handle relative file specifications 
that could expand to long pathnames, but not the longer pathnames directly.

This primarily affects scripts that invoke other programs either 
directly from Perl, or build scripts to be run by other programs like 
MakeMaker does.

For compatibility VMS has ways of expressing a long path as a short 
path.  The VMS::Filespec::rmsexpand() function will do that 
automatically now if the resulting file specification is greater than 
255 characters.

It is very unlikely that any of the Perl file parsing or unixify/vmsify 
routines would properly handle such shortened path names at this time.

In general, such shortened path names use a dev_t/ino_t type combination 
to access the file, so it is not possible to recover the original exact 
pathname before the path was shortened because there could be multiple 
links to the same file, and there also could have been logical names 
that were expanded.

As such, it is very unlikely but not impossible that there are existing 
Perl scripts that would break directly from adding better support of the 
longer path names.

What I am looking at doing is:

1. Having unixify() always produce a POSIX style path name even if it 
needs to expand a shortened VMS pathname.

2. Having vmsify() always produce a traditional VMS pathname, even if it 
needs to expand a shortened name.

3. For handling ODS-5 extended filenames, when translating from VMS to 
UNIX format, "concealed rooted" logical names will not be expanded for 
absolute specifications.  Historically Perl has done with with UNIXIFY, 
and this causes a loss of information in some cases, and in the case of 
search lists can cause a program to do unexpectedly the wrong thing.

4. VMS::Filespec::rmsexpand() will continue to by default always output
a VMS file specification that will fit in 255 characters.  An option may 
be added to expand to a larger path name.

As the longer path names do not work now, and the DCL shell and many 
utilities can not directly work with them, I do not see that there would 
be much impact to implementing the changes this way.

Perl programs that expect to run on OpenVMS VAX need to continue to be 
restricted to the ODS-2 limitations listed in perlport.pod.

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