From: Rafael Garcia-Suarez Date: Mon, 10 Sep 2007 08:34:08 +0000 (+0000) Subject: Upgrade to ExtUtils::Install 1.44 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fef074f7c29876fb6c02244b464e092f2047abda;p=p5sagit%2Fp5-mst-13.2.git Upgrade to ExtUtils::Install 1.44 p4raw-id: //depot/perl@31837 --- diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index 8ac42d6..d60bc6c 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 dacc3fb..ae8d781 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} = '';