diff options
author | Jos I. Boumans <kane@dwim.org> | 2007-11-09 16:50:11 +0100 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2007-11-09 16:35:18 +0000 |
commit | 768b421c7d2a7cabf713f8a2ac8b4549037b1251 (patch) | |
tree | 2b82162fd8237b66dc9cf1c3a2b5fc1674cad9fb /lib/CPANPLUS | |
parent | b03f445cd64f5d8457979c447da69dd3b638df69 (diff) | |
download | perl-768b421c7d2a7cabf713f8a2ac8b4549037b1251.tar.gz |
CPANPLUS 0.083_09
From: "Jos I. Boumans" <jos@dwim.org>
Message-Id: <B17C3858-AF8D-4FDE-AE15-F612E7B41FC9@dwim.org>
p4raw-id: //depot/perl@32252
Diffstat (limited to 'lib/CPANPLUS')
13 files changed, 48 insertions, 24 deletions
diff --git a/lib/CPANPLUS/Config.pm b/lib/CPANPLUS/Config.pm index b0921339b6..f9f5391816 100644 --- a/lib/CPANPLUS/Config.pm +++ b/lib/CPANPLUS/Config.pm @@ -486,18 +486,42 @@ remains empty if you do not require super user permissiosn to install. =cut $Conf->{'program'}->{'sudo'} = do { - $> # check for all install dirs! - # installsiteman3dir is a 5.8'ism.. don't check - # it on 5.6.x... - ? ( -w $Config{'installsitelib'} && - ( defined $Config{'installsiteman3dir'} && - -w $Config{'installsiteman3dir'} - ) && - -w $Config{'installsitebin'} - ? undef - : can_run('sudo') - ) - : can_run('sudo') + + ### let's assume you dont need sudo, + ### unless one of the below criteria tells us otherwise + my $sudo = undef; + + ### you're a normal user, you might need sudo + if( $> ) { + + ### check for all install dirs! + ### installsiteman3dir is a 5.8'ism.. don't check + ### it on 5.6.x... + ### you have write permissions to the installdir, + ### you don't need sudo + if( -w $Config{'installsitelib'} && + ( defined $Config{'installsiteman3dir'} && + -w $Config{'installsiteman3dir'} + ) && -w $Config{'installsitebin'} + ) { + $sudo = undef; + + ### you have PERL_MM_OPT set to some alternate + ### install place. You probably have write permissions + ### to that + } elsif ( $ENV{'PERL_MM_OPT'} and + $ENV{'PERL_MM_OPT'} =~ /INSTALL|LIB|PREFIX/ + ) { + $sudo = undef; + + ### you probably don't have write permissions + } else { + $sudo = can_run('sudo'); + } + } + + ### and return the value + $sudo; }; =item perlwrapper diff --git a/lib/CPANPLUS/Internals.pm b/lib/CPANPLUS/Internals.pm index 6bc6813fbe..68d71aae90 100644 --- a/lib/CPANPLUS/Internals.pm +++ b/lib/CPANPLUS/Internals.pm @@ -40,7 +40,7 @@ use vars qw[@ISA $VERSION]; CPANPLUS::Internals::Report ]; -$VERSION = "0.83_08"; +$VERSION = "0.83_09"; =pod diff --git a/lib/CPANPLUS/Shell/Default.pm b/lib/CPANPLUS/Shell/Default.pm index 66d31840aa..d3068e078e 100644 --- a/lib/CPANPLUS/Shell/Default.pm +++ b/lib/CPANPLUS/Shell/Default.pm @@ -26,7 +26,7 @@ local $Data::Dumper::Indent = 1; # for dumpering from ! BEGIN { use vars qw[ $VERSION @ISA ]; @ISA = qw[ CPANPLUS::Shell::_Base::ReadLine ]; - $VERSION = "0.83_08"; + $VERSION = "0.83_09"; } load CPANPLUS::Shell; diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed index c9546f83ab..576975c9ca 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed -Created at Sun Nov 4 11:24:49 2007 +Created at Fri Nov 9 15:20:34 2007 ######################################################################### __UU__ M'XL("%_EO$4``S`Q;6%I;')C+G1X=`!+S,E,+%9P#8T(5@`#)=>*DM"2S)QB diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed index 0c22cdc46f..0d01bf8a81 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed -Created at Sun Nov 4 11:24:49 2007 +Created at Fri Nov 9 15:20:34 2007 ######################################################################### __UU__ M'XL("!1%OT4"`T)U;F1L92U&;V\M0F%R+3`N,#$N=&%R`.V7:V_:,!2&^8I_ diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.tar.gz.packed index 71e0feb369..29f0ca9de9 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/Foo-Bar-0.01.tar.gz.packed -Created at Sun Nov 4 11:24:50 2007 +Created at Fri Nov 9 15:20:34 2007 ######################################################################### __UU__ M'XL("/8X34("`T9O;RU"87(M,"XP,2YT87(`[9KQ;]I&%,?Y^?Z*1YE$(A5C diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/perl5.005_03.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/perl5.005_03.tar.gz.packed index 8a25510cfe..2d0f5986bd 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/perl5.005_03.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/perl5.005_03.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/perl5.005_03.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/EUNOXS/perl5.005_03.tar.gz.packed -Created at Sun Nov 4 11:24:50 2007 +Created at Fri Nov 9 15:20:34 2007 ######################################################################### __UU__ M'XL(`'3DO44``^W/,0J`,`Q`T1RE)Y"T-O4XXN"DB%2]OR(*NNC4[;_E#\F0 diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.tar.gz.packed index cc106adca3..11e57857b9 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/EUXS/Foo-Bar-0.01.tar.gz.packed -Created at Sun Nov 4 11:24:50 2007 +Created at Fri Nov 9 15:20:34 2007 ######################################################################### __UU__ M'XL("`DY34("`T9O;RU"87(M,"XP,2YT87(`[5IK3]M(%,U7YE=<H%5``A.; diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/MBNOXS/Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/MBNOXS/Foo-Bar-0.01.tar.gz.packed index 117ce6db4d..7534d1438d 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/MBNOXS/Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/MBNOXS/Foo-Bar-0.01.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/MBNOXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/MBNOXS/Foo-Bar-0.01.tar.gz.packed -Created at Sun Nov 4 11:24:50 2007 +Created at Fri Nov 9 15:20:34 2007 ######################################################################### __UU__ M'XL("-<X34(``T9O;RU"87(M,"XP,2YT87(`[9E;;]HP%,=Y]J<X+9722@-R diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.tar.gz.packed index 19b54371b1..6966be0221 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/MBXS/Foo-Bar-0.01.tar.gz.packed -Created at Sun Nov 4 11:24:50 2007 +Created at Fri Nov 9 15:20:34 2007 ######################################################################### __UU__ M'XL("-\X34(``T9O;RU"87(M,"XP,2YT87(`[5K_3QI)%/=7YZ]XU39H(BN[ diff --git a/lib/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz.packed index 4b4ff96449..e41cf531ae 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz lib/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz.packed -Created at Sun Nov 4 11:24:50 2007 +Created at Fri Nov 9 15:20:34 2007 ######################################################################### __UU__ M'XL("$TN$T<``S`R<&%C:V%G97,N9&5T86EL<RYT>'0`G=-1;],P$`#@=_^* diff --git a/lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed index be6cb03e32..da8a1f55d4 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed -Created at Sun Nov 4 11:24:50 2007 +Created at Fri Nov 9 15:20:34 2007 ######################################################################### __UU__ M'XL("#'FO$4``S`S;6]D;&ES="YD871A`%U3_6O;,!#].?HKCBXC"20A=<@& diff --git a/lib/CPANPLUS/t/inc/conf.pl b/lib/CPANPLUS/t/inc/conf.pl index dc439924df..fe6a20f979 100644 --- a/lib/CPANPLUS/t/inc/conf.pl +++ b/lib/CPANPLUS/t/inc/conf.pl @@ -24,7 +24,7 @@ BEGIN { ### and add them to the environment, so shellouts get them $old_env_perl5lib = $ENV{'PERL5LIB'}; - $ENV{'PERL5LIB'} = join ':', + $ENV{'PERL5LIB'} = join $Config{'path_sep'}, grep { defined } $ENV{'PERL5LIB'}, @paths, @rel2abs; ### add our own path to the front of $ENV{PATH}, so that cpanp-run-perl |