use vars qw( @EXPORT @ISA $VERSION );
@EXPORT = qw( shell fetch get install );
@ISA = qw( Exporter );
- $VERSION = "0.83_08"; #have to hardcode or cpan.org gets unhappy
+ $VERSION = "0.83_09"; #have to hardcode or cpan.org gets unhappy
}
### purely for backward compatibility, so we can call it from the commandline:
=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
CPANPLUS::Internals::Report
];
-$VERSION = "0.83_08";
+$VERSION = "0.83_09";
=pod
BEGIN {
use vars qw[ $VERSION @ISA ];
@ISA = qw[ CPANPLUS::Shell::_Base::ReadLine ];
- $VERSION = "0.83_08";
+ $VERSION = "0.83_09";
}
load CPANPLUS::Shell;
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
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_
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
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
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.;
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
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[
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$`#@=_^*
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=<@&
### 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