Skip Menu |

This queue is for tickets about the ExtUtils-Constant CPAN distribution.

Report information
The Basics
Id: 81249
Status: patched
Priority: 0/
Queue: ExtUtils-Constant

People
Owner: Nobody in particular
Requestors: cberry [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.23
Fixed in: (no value)



Subject: [PATCH] test fix-ups for VMS
The attached patch simplifies and corrects the various types of special handling for VMS in constant.t. It turns out the easiest and most robust way to handle the fact that filename case may or may not be preserved is simply to do all filename comparisons in a case blind fashion. This is safe to do because there is no practical possibility of distinct filenames that differ only by case, especially with the short list of well-know files being considered here.
Subject: constant_t.patch
--- cpan/ExtUtils-Constant/t/Constant.t;-0 2011-10-04 12:55:37 -0500 +++ cpan/ExtUtils-Constant/t/Constant.t 2012-11-16 22:23:59 -0600 @@ -39,31 +39,7 @@ $make = $ENV{MAKE} if exists $ENV{MAKE}; if ($^O eq 'MSWin32' && $make eq 'nmake') { $make .= " -nologo"; } # VMS may be using something other than MMS/MMK -my $mms_or_mmk = 0; -my $vms_lc = 0; -my $vms_nodot = 0; -if ($^O eq 'VMS') { - $mms_or_mmk = 1 if (($make eq 'MMK') || ($make eq 'MMS')); - $vms_lc = 1; - $vms_nodot = 1; - my $vms_unix_rpt = 0; - my $vms_efs = 0; - my $vms_efs_case = 0; - if (eval 'require VMS::Feature') { - $vms_unix_rpt = VMS::Feature::current("filename_unix_report"); - $vms_efs = VMS::Feature::current("efs_case_preserve"); - $vms_efs_case = VMS::Feature::current("efs_charset"); - } 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_efs_case = $efs_case =~ /^[ET1]/i; - } - $vms_lc = 0 if $vms_efs_case; - $vms_nodot = 0 if $vms_unix_rpt; -} +my $mms_or_mmk = ($make =~ m/^MM(S|K)/i) ? 1 : 0; # Renamed by make clean my $makefile = ($mms_or_mmk ? 'descrip' : 'Makefile'); @@ -125,12 +101,12 @@ package main; sub check_for_bonus_files { my $dir = shift; - my %expect = map {($vms_lc ? lc($_) : $_), 1} @_; + my %expect = map {($^O eq 'VMS' ? lc($_) : $_), 1} @_; my $fail; opendir DIR, $dir or die "opendir '$dir': $!"; while (defined (my $entry = readdir DIR)) { - $entry =~ s/\.$// if $vms_nodot; # delete trailing dot that indicates no extension + $entry =~ s/(.*?)\.?$/\L$1/ if $^O eq 'VMS'; next if $expect{$entry}; print "# Extra file '$entry'\n"; $fail = 1;
Subject: Re: [rt.cpan.org #81249] AutoReply: [PATCH] test fix-ups for VMS
Date: Sat, 17 Nov 2012 08:56:46 -0600
To: bug-ExtUtils-Constant [...] rt.cpan.org
From: "Craig A. Berry" <craigberry [...] mac.com>
Forgot to mention that the patch is against blead, so apply with -p2.
On Sat Nov 17 09:53:38 2012, CBERRY wrote: Show quoted text
> The attached patch simplifies and corrects the various types of > special handling for VMS in > constant.t. It turns out the easiest and most robust way to handle > the fact that filename case > may or may not be preserved is simply to do all filename comparisons > in a case blind fashion. > This is safe to do because there is no practical possibility of > distinct filenames that differ only by > case, especially with the short list of well-know files being > considered here.
Very late, but now applied and uploaded to CPAN as part of the dev release 0.23_50. Nicholas Clark