Craig A. Berry wrote:
At the moment I've enabled as the default (on systems that have the
infrastructure) John Malmberg's symlink support in the Perl that will
become 5.10.  I'm having second thoughts about whether the underlying
support in VMS is good enough or complete enough to make it the
default, so I thought I would throw it out there for discussion.

Not long ago, we found out that the unlink() function in the CRTL
doesn't work on symlinks unless DECC$POSIX_COMPLIANT_PATHNAMES is
defined, and defining that is likely to break lots of things.  John
worked around that by writing his own unlink() based on SYS$ERASE,
and other projects have done the same, for example Python:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1157019

I've been trying to track down test failures in the File::Find tests
in blead, and have discovered that chdir() also does not work on
symlinks.  The obvious solution is to call realpath() in our chdir()
wrapper before calling the CRTL's chdir(), but this obvious solution
doesn't work.  It doesn't work because realpath() does not work
unless posix-compliant pathnames are enabled.  Unlike the unlink
case, that's documented behavior in the v8.3 CRTL:

http://h71000.www7.hp.com/doc/83final/5763/5763pro_021.html#crtl_symlinks

I thought that I had the File::Find tests working with symbolic links. The only thing that I had not gotten working was the ones that needed realpath().

Symbolic links do have some special requirements, they must be in UNIX syntax to be resolved, and they must be either a relative specification to the directory they are in, or there must be a valid path to them from the VMS root set with the SET ROOT.

To go off volume a mount point needs to be set. I have not set an off volume mount point. Other paths may need an on-volume mount point to work.

So rolling our own chdir() should be doable, one way or another.  But
this made me stop and wonder how many other CRTL routines that
operate on files need to be changed to handle symbolic links
properly, but haven't been as of OpenVMS v8.3.  Anyone know of cases
besides unlink() and chdir() that don't work?  Should we be bold and
enable this support in Perl even though we don't know how much of it
actually works?

I think until we get some more testing done, we should not consider the symbolic link stuff ready. I have only had a chance to glance at your patch to the cwd.t routines, but they are completely different than what I had to do to get Perl 5.8.7 to work with symbolic links in the Posix Compliant Mode.

The major work in getting the symbolic link code working, based on my past work in this area is in getting the ODS-5 support working in both UNIX and VMS file specifications.

Also, until HP gets the logical name support for POSIX pathnames into RMS, the Posix compliant pathnames are not very useful, as just about every existing library written in C is likely to break.

A significant amount of the work that I did in my prior work in Perl was to work around RMS not handling logical names in the POSIX Compliant path names.

-John
[EMAIL PROTECTED]
Personal Opinion Only

Reply via email to