diff options
author | John Malmberg <wb8tyw@gmail.com> | 2009-02-15 09:25:10 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-02-15 09:37:24 -0600 |
commit | 3d55b451d9544fbd4c27c33287b76bee30328830 (patch) | |
tree | 02afa4ad1d9488a1638a37e6d4a69d33195e56d7 /lib/ExtUtils/Install.pm | |
parent | e28f3139a63672a86833f04e78c6d3b42814350b (diff) | |
download | perl-3d55b451d9544fbd4c27c33287b76bee30328830.tar.gz |
ExtUtils::Install VMS extended character set support
Preview from https://rt.cpan.org/Ticket/Display.html?id=42149
Diffstat (limited to 'lib/ExtUtils/Install.pm')
-rw-r--r-- | lib/ExtUtils/Install.pm | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index d8f325a5c2..c8aa0b3085 100644 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -42,7 +42,7 @@ ExtUtils::Install - install files from here to there =cut -$VERSION = '1.52'; +$VERSION = '1.52_01'; $VERSION = eval $VERSION; =pod @@ -92,11 +92,34 @@ Dies with a special message. =cut my $Is_VMS = $^O eq 'VMS'; +my $Is_VMS_noefs = $Is_VMS; my $Is_MacPerl = $^O eq 'MacOS'; my $Is_Win32 = $^O eq 'MSWin32'; my $Is_cygwin = $^O eq 'cygwin'; my $CanMoveAtBoot = ($Is_Win32 || $Is_cygwin); + if( $Is_VMS ) { + my $vms_unix_rpt; + my $vms_efs; + my $vms_case; + + if (eval { local $SIG{__DIE__}; require VMS::Feature; }) { + $vms_unix_rpt = VMS::Feature::current("filename_unix_report"); + $vms_efs = VMS::Feature::current("efs_charset"); + $vms_case = VMS::Feature::current("efs_case_preserve"); + } else { + my $unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || ''; + my $efs_charset = $ENV{'DECC$EFS_CHARSET'} || ''; + my $efs_case = $ENV{'DECC$EFS_CASE_PRESERVE'} || ''; + $vms_unix_rpt = $unix_rpt =~ /^[ET1]/i; + $vms_efs = $efs_charset =~ /^[ET1]/i; + $vms_case = $efs_case =~ /^[ET1]/i; + } + $Is_VMS_noefs = 0 if ($vms_efs); + } + + + # *note* CanMoveAtBoot is only incidentally the same condition as below # this needs not hold true in the future. my $Has_Win32API_File = ($Is_Win32 || $Is_cygwin) @@ -405,7 +428,9 @@ sub _can_write_dir { my $path=''; my @make; while (@dirs) { - if ($Is_VMS) { + if ($Is_VMS_noefs) { + # There is a bug in catdir that is fixed when the EFS character + # set is enabled, which requires this VMS specific code. $dir = File::Spec->catdir($vol,@dirs); } else { |