From: Craig A. Berry Date: Sun, 11 Mar 2007 23:42:14 +0000 (+0000) Subject: ExtUtils::Manifest fix-ups for VMS: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a2fa79ff09c6e833b390c6a5d5fb10ed23b1cac1;p=p5sagit%2Fp5-mst-13.2.git ExtUtils::Manifest fix-ups for VMS: - don't use multiple dots in .bak filenames - remove VMS-specific clobbering of keys with values in mkmanifest() patch also in RT at p4raw-id: //depot/perl@30544 --- diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm index f3459ae..ee508c8 100644 --- a/lib/ExtUtils/Manifest.pm +++ b/lib/ExtUtils/Manifest.pm @@ -13,7 +13,7 @@ use vars qw($VERSION @ISA @EXPORT_OK $Is_MacOS $Is_VMS $Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP); -$VERSION = '1.51'; +$VERSION = '1.51_01'; @ISA=('Exporter'); @EXPORT_OK = qw(mkmanifest manicheck filecheck fullcheck skipcheck @@ -93,7 +93,9 @@ sub mkmanifest { my $read = (-r 'MANIFEST' && maniread()) or $manimiss++; $read = {} if $manimiss; local *M; - rename $MANIFEST, "$MANIFEST.bak" unless $manimiss; + my $bakbase = $MANIFEST; + $bakbase =~ s/\./_/g if $Is_VMS; # avoid double dots + rename $MANIFEST, "$bakbase.bak" unless $manimiss; open M, ">$MANIFEST" or die "Could not open $MANIFEST: $!"; my $skip = _maniskip(); my $found = manifind(); @@ -112,7 +114,6 @@ sub mkmanifest { warn "Added to $MANIFEST: $file\n" unless exists $read->{$file}; } my $text = $all{$file}; - ($file,$text) = split(/\s+/,$text,2) if $Is_VMS && $text; $file = _unmacify($file); my $tabs = (5 - (length($file)+1)/8); $tabs = 1 if $tabs < 1; @@ -405,8 +406,10 @@ sub _check_mskip_directives { } close M; return unless $flag; - rename $mfile, "$mfile.bak"; - warn "Debug: Saving original $mfile as $mfile.bak\n" if $Debug; + my $bakbase = $mfile; + $bakbase =~ s/\./_/g if $Is_VMS; # avoid double dots + rename $mfile, "$bakbase.bak"; + warn "Debug: Saving original $mfile as $bakbase.bak\n" if $Debug; unless (open M, ">$mfile") { warn "Problem opening $mfile: $!"; return; diff --git a/lib/ExtUtils/t/Manifest.t b/lib/ExtUtils/t/Manifest.t index c11c944..e8732ad 100644 --- a/lib/ExtUtils/t/Manifest.t +++ b/lib/ExtUtils/t/Manifest.t @@ -249,7 +249,8 @@ is( $files->{foobar}, '', ' preserved old entries' ); 'mymanifest.skip excluded via mydefault.skip' ); ok( ! exists $files->{'mydefault.skip'}, 'mydefault.skip excluded via mydefault.skip' ); - $Files{"$_.bak"}++ for (qw(MANIFEST MANIFEST.SKIP)); + my $extsep = $Is_VMS ? '_' : '.'; + $Files{"$_.bak"}++ for ('MANIFEST', "MANIFEST${extsep}SKIP"); } add_file('MANIFEST' => 'Makefile.PL');