diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-09-10 08:34:08 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-09-10 08:34:08 +0000 |
commit | fef074f7c29876fb6c02244b464e092f2047abda (patch) | |
tree | 248a907dd4ab7aca5888b75919a554ec75528257 /lib/ExtUtils | |
parent | 58852444fed22b881d4d7c0fb448bf375e4033c1 (diff) | |
download | perl-fef074f7c29876fb6c02244b464e092f2047abda.tar.gz |
Upgrade to ExtUtils::Install 1.44
p4raw-id: //depot/perl@31837
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r-- | lib/ExtUtils/Install.pm | 4 | ||||
-rw-r--r-- | lib/ExtUtils/t/Install.t | 25 |
2 files changed, 24 insertions, 5 deletions
diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index 8ac42d6b62..d60bc6cb81 100644 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -3,7 +3,7 @@ use 5.00503; use strict; use vars qw(@ISA @EXPORT $VERSION $MUST_REBOOT %Config); -$VERSION = '1.43'; +$VERSION = '1.44'; $VERSION = eval $VERSION; use AutoSplit; @@ -674,7 +674,7 @@ sub install { #XXX OS-SPECIFIC print "Skipping $targetfile (unchanged)\n" if $verbose; } - if ( defined $inc_uninstall ) { + if ( $inc_uninstall ) { inc_uninstall($sourcefile,$ffd, $verbose, $nonono, $realtarget ne $targetfile ? $realtarget : ""); diff --git a/lib/ExtUtils/t/Install.t b/lib/ExtUtils/t/Install.t index dacc3fb823..ae8d781104 100644 --- a/lib/ExtUtils/t/Install.t +++ b/lib/ExtUtils/t/Install.t @@ -17,7 +17,7 @@ use TieOut; use File::Path; use File::Spec; -use Test::More tests => 33; +use Test::More tests => 38; use MakeMaker::Test::Setup::BFD; @@ -98,13 +98,32 @@ ok( -r 'install-test/packlist', ' packlist exists' ); ok( -r 'install-test/lib/perl/Big/Dummy.pm', ' UNINST=1 preserved same' ); - -# Test UNINST=1 removing other versions in other dirs. chmod 0644, 'blib/lib/Big/Dummy.pm' or die $!; open(DUMMY, ">>blib/lib/Big/Dummy.pm") or die $!; print DUMMY "Extra stuff\n"; close DUMMY; + +# Test UNINST=0 does not remove other versions in other dirs. +{ + ok( -r 'install-test/lib/perl/Big/Dummy.pm', 'different install exists' ); + + local @INC = ('install-test/lib/perl'); + local $ENV{PERL5LIB} = ''; + install( { 'blib/lib' => 'install-test/other_lib/perl', + read => 'install-test/packlist', + write => 'install-test/packlist' + }, + 0, 0, 0); + ok( -d 'install-test/other_lib/perl', 'install made other dir' ); + ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' ); + ok( -r 'install-test/packlist', ' packlist exists' ); + ok( -r 'install-test/lib/perl/Big/Dummy.pm', + ' UNINST=0 left different' ); +} + + +# Test UNINST=1 removing other versions in other dirs. { local @INC = ('install-test/lib/perl'); local $ENV{PERL5LIB} = ''; |