Jos I. Boumans wrote:
Hi,
On 21 Aug 2007, at 04:55, John E. Malmberg wrote:
In pp_ctl.c, on VMS, normally the path used for the %INC key is in
UNIX filename syntax, however if require is given a VMS format
filename, it stores it as the %INC key.
The load conditional code does a require using the VMS format, and
since it does not match the key in UNIX format, modules can be loaded
twice. This showed up by causing the extract tests to emit
diagnostics about routines being overridden.
This patch forces the %INC key to be in UNIX format so that the
modules will not be loaded twice.
In 01_Module_Load.t, on VMS, the $file for the module will now be
returned in UNIX format.
In 01_Module_Load_Conditional.t, some work arounds are needed for
issues with VMS handling of UNIX pathnames incorrectly.
Hmm, these 2 files are part of modules i maintain -- is the applied patch
only required after your change to pp_ctl.c or in general? if so, do
you have a CPAN'able fix as well?
A CPAN'able fix would require a work around for the issue that I patched
pp_ctl.c to fix.
It would require finding every place in module load that does a require
on a file, and making sure that on VMS, the file is converted to UNIX
syntax first, so that the key will be correct.
The other patches are also needed. The one in 01_Module_load.t matches
the key to the %INC hash caused by the require, and the other is to work
around some platform specific quirks in the file parsing routines.
This could also affect any other platform that has its own native file
syntax and also supports the UNIX file syntax.
I am only aware of VMS::Filespec::vmsify() and unixify(). What may be
needed is a more generic Native_to_POSIX and POSIX_to_Native conversion
routines, with the conversions to Native format needing an option to
have the resulting name be long format or short format. Of course some
more easy to type names would be needed.
Also, if possible, please Cc the module maintainer (if you know who
they are of course ;) on such changes.
I will try to remember that.
-John
[EMAIL PROTECTED]
Personal Opinion Only