John E. Malmberg wrote:
> Are you going to have time to look at the patches that I submitted to
> MakeMaker and Test::Simple?
>
> These are to support VMS when the DECC$FILENAME_UNIX_REPORT and
> DECC$EFS_CHARSET and related options are active.
>
> These options make Perl on VMS look more like Unix, including returning
> filenames in Unix syntax. Path tools has already been updated to work
> in this mode.
I had a look at this, and I can't apply it. It was bad enough having special
case code for VMS, now there's three different styles of VMS to be considered.
Here's the mass of detection code:
use VMS::Feature;
my $vms_unix_rpt = VMS::Feature::current("filename_unix_report");
my $vms_efs = VMS::Feature::current("efs_charset");
my $vms_case = VMS::Feature::current("efs_case_preserve");
$Is{VMS_mode} = 0 if $vms_unix_rpt;
$Is{VMS_unix} = 1 if $vms_unix_rpt;
$Is{VMS_lc} = 0 if $vms_case;
$Is{VMS_noefs} = 0 if $vms_efs;
That mercifully doesn't include the work around if VMS::Feature isn't there.
There's no way to expect Perl programmers to stick all that in their code just
to accommodate VMS.
But this diff here illustrates the real problem:
- is( $mm->{INSTALLVENDORMAN1DIR}, File::Spec->catdir('foo','bar'),
+ my $expect = File::Spec->catdir('foo','bar');
+ $expect = VMS::Filespec::vmspath($expect) if $Is_VMS;
+ is( $mm->{INSTALLVENDORMAN1DIR}, $expect,
'installvendorman1dir (in %Config) not modified' );
Now every call to File::Spec, which is supposed to generate a portable path,
has to have extra code tacked onto the end to do more work. If that's
necessary then File::Spec::VMS should be doing it.
In conclusion, this should all be built into File::Spec::VMS.
--
ROCKS FALL! EVERYONE DIES!
http://www.somethingpositive.net/sp05032002.shtml