John E. Malmberg wrote:

[EMAIL PROTECTED] wrote:

Is there any way to turn off the period to underscore translation in the VMSIFY
routine?


I am using the HP kit of Perl 5.8.6 and as the following example shows, a
period in a directory name is being converted to an underscore.


Which kit?  The special one for the SYMLINK SDK or the normal one?


The normal kit.


use VMS::Filespec;

$udir1 = '../dir1/dir.period/file';
$udir2 = '../dir1/dir^.period/file';

$vdir1 = vmsify($udir1);
$vdir2 = vmsify($udir2);

printf "$vdir1\n$vdir2";

$ perl test.pl
[-.dir1.dir_period]file
[-.dir1.dir^_period]file

Even when the exta period is escaped it gets translated to an underscore. This happens if I invoke VMSIFY directly and also happens behind the scenes (the Unix filespec is being passed to the copy function in the program where I
discovered this issue).

Is there any way to turn this off or am I going to have to modify code?


Some of the support is in the current blead perl. It is not complete, but is getting better all the time. Activation of the support requires setting the DECC$ feature logicals.

The patches needed for the core modules to honor the DECC$ for Perl 5.8.7 have previously been posted to this mailing list, but were not in a format suitable for inclusion into the main perl code. With out that support, what is present in blead is not real useful.

$ perl test.pl
[-.dir1.dir_period]file
[-.dir1.dir^_period]file
$ define decc$efs_charset enable
$ perl test.pl
[-.dir1.dir^.period]file
[-.dir1.dir^^.period]file

$ perl --version

This is perl, v5.8.7 built for VMS_AXP

So, for 5.8.6, there is no switch or logical that controls this aspect of the filename translation? I need to modify to the code to get what I need?

On a related note (since I'm going to have to change code anyway): does any one know why the logical DECC$FILENAME_UNIX_ONLY impacts the -e switch? As in:
$
$ DEFINE DECC$FILENAME_UNIX_ONLY FALSE
$ perl -e "print 1;"
1
$ DEFINE DECC$FILENAME_UNIX_ONLY TRUE
%DCL-I-SUPERSEDE, previous value of DECC$FILENAME_UNIX_ONLY has been superseded
$ perl -e "print 1;"
Can't open perl script "-e": no such file or directory
%RMS-E-FNF, file not found
$

Mark Berryman




Reply via email to