diff options
author | Craig A. Berry <craigberry@mac.com> | 2007-03-11 23:42:14 +0000 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2007-03-11 23:42:14 +0000 |
commit | a2fa79ff09c6e833b390c6a5d5fb10ed23b1cac1 (patch) | |
tree | eb6c4278de91143fe4d44ff20b47facf1fad56de /lib | |
parent | 99ec4a7efd4048a25e86d8a4220d20e87e436f1e (diff) | |
download | perl-a2fa79ff09c6e833b390c6a5d5fb10ed23b1cac1.tar.gz |
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 <http://rt.cpan.org//Ticket/Display.html?id=25377>
p4raw-id: //depot/perl@30544
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExtUtils/Manifest.pm | 13 | ||||
-rw-r--r-- | lib/ExtUtils/t/Manifest.t | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm index f3459ae5b7..ee508c8fa9 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 c11c94490e..e8732ad9fc 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'); |