From: Steve Peters Date: Wed, 15 Aug 2007 16:17:13 +0000 (+0000) Subject: Upgrade to CPANPLUS-0.82 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d0baa00e92a40837ed5558e0a1cc115d59694269;p=p5sagit%2Fp5-mst-13.2.git Upgrade to CPANPLUS-0.82 p4raw-id: //depot/perl@31723 --- diff --git a/lib/CPANPLUS.pm b/lib/CPANPLUS.pm index c9ef109..52595d2 100644 --- a/lib/CPANPLUS.pm +++ b/lib/CPANPLUS.pm @@ -13,7 +13,7 @@ BEGIN { use vars qw( @EXPORT @ISA $VERSION ); @EXPORT = qw( shell fetch get install ); @ISA = qw( Exporter ); - $VERSION = "0.81_01"; #have to hardcode or cpan.org gets unhappy + $VERSION = "0.82"; #have to hardcode or cpan.org gets unhappy } ### purely for backward compatibility, so we can call it from the commandline: diff --git a/lib/CPANPLUS/Backend.pm b/lib/CPANPLUS/Backend.pm index 50b13c4..32ed716 100644 --- a/lib/CPANPLUS/Backend.pm +++ b/lib/CPANPLUS/Backend.pm @@ -380,7 +380,7 @@ for my $func (qw[fetch extract install readme files distributions]) { =pod -=head2 $mod_obj = $cb->parse_module( module => $modname|$distname|$modobj ) +=head2 $mod_obj = $cb->parse_module( module => $modname|$distname|$modobj|URI ) C tries to find a C object that matches your query. Here's a list of examples you could give to diff --git a/lib/CPANPLUS/Config.pm b/lib/CPANPLUS/Config.pm index 91eae92..fe17881 100644 --- a/lib/CPANPLUS/Config.pm +++ b/lib/CPANPLUS/Config.pm @@ -568,8 +568,10 @@ with CPANPLUS, which is used to enable autoflushing in spawned processes. ### or user installs ### note that we don't use 'can_run' as it's ### not an executable, just a wrapper... - for my $dir (split(/\Q$Config::Config{path_sep}\E/, $ENV{PATH}), - File::Spec->curdir + ### prefer anything that's found in the path paralel to your $^X + for my $dir (File::Spec->rel2abs( dirname($^X) ), + split(/\Q$Config::Config{path_sep}\E/, $ENV{PATH}), + File::Spec->curdir, ) { $maybe = File::Spec->catfile( $dir, $bin ); $path = $maybe and last BIN if -f $maybe; @@ -584,6 +586,8 @@ with CPANPLUS, which is used to enable autoflushing in spawned processes. ### cross your fingers... ### pass '-P' to perl: "run program through C ### preprocessor before compilation" + ### XXX using -P actually changes the way some Makefile.PLs + ### are executed, so don't do that... --kane error(loc( "Could not find the '%1' binary in your path". "--this may be a problem.\n". diff --git a/lib/CPANPLUS/Configure.pm b/lib/CPANPLUS/Configure.pm index b4123d9..d890d1c 100644 --- a/lib/CPANPLUS/Configure.pm +++ b/lib/CPANPLUS/Configure.pm @@ -463,18 +463,10 @@ Locations and names of source files locally. Locations and names of source files remotely. -=item _set|_get_dist - -Mapping of distribution format names to modules. - =item _set|_get_fetch Special settings pertaining to the fetching of files. -=item _set|_get_daemon - -Settings for C, the CPANPLUS daemon. - =back =cut diff --git a/lib/CPANPLUS/Internals.pm b/lib/CPANPLUS/Internals.pm index 62cf6b0..7d02eeb 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.81_01"; +$VERSION = "0.82"; =pod @@ -160,7 +160,7 @@ Returns the object on success, or dies on failure. if( my $id = $class->_last_id ) { # make it a singleton. warn loc(q[%1 currently only supports one %2 object per ] . - q[running program], 'CPANPLUS', $class); + qq[running program\n], 'CPANPLUS', $class); return $class->_retrieve_id( $id ); } diff --git a/lib/CPANPLUS/Shell/Default.pm b/lib/CPANPLUS/Shell/Default.pm index d959160..08fb19c 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.81_01"; + $VERSION = "0.82"; } load CPANPLUS::Shell; @@ -330,8 +330,10 @@ sub dispatch_on_input { if( $key eq 'z' or ($key eq 's' and $input =~ /^\s*edit/) ) { - print "\n", loc("Command not supported over remote connection"), - "\n\n"; + print "\n", + loc( "Command '%1' not supported over remote connection", + join ' ', $key, $input + ), "\n\n"; } else { my($status,$buff) = $self->__send_remote_command($org_input); diff --git a/lib/CPANPLUS/Shell/Default/Plugins/Remote.pm b/lib/CPANPLUS/Shell/Default/Plugins/Remote.pm index c351367..d2b829a 100644 --- a/lib/CPANPLUS/Shell/Default/Plugins/Remote.pm +++ b/lib/CPANPLUS/Shell/Default/Plugins/Remote.pm @@ -64,10 +64,8 @@ sub connect { { local $Params::Check::ALLOW_UNKNOWN = 1; my $tmpl = { - user => { default => $conf->_get_daemon('username'), - store => \$user }, - pass => { default => $conf->_get_daemon('password'), - store => \$pass }, + user => { default => 'cpanpd', store => \$user }, + pass => { required => 1, store => \$pass }, }; check( $tmpl, $opts ) or return; @@ -75,7 +73,7 @@ sub connect { my @parts = split /\s+/, $input; my $host = shift @parts || 'localhost'; - my $port = shift @parts || $conf->_get_daemon('port'); + my $port = shift @parts || '1337'; load IO::Socket; @@ -114,7 +112,7 @@ sub connect { ### save the original prompt $Saved_Prompt = $shell->prompt; - $shell->prompt( $shell->brand .'@'. $host .'> ' ); + $shell->prompt( $shell->brand .'@'. $host .':'. $port .'> ' ); } else { print "\n$buffer\n\n"; 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 8fb567c..78d7f71 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 Sat Jul 7 11:15:17 2007 +Created at Wed Aug 15 16:13:41 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/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed index 0be5624..3dc27fd 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/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/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed -Created at Sat Jul 7 11:15:17 2007 +Created at Wed Aug 15 16:13:41 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/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed index 17acea3..3362539 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/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/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed -Created at Sat Jul 7 11:15:17 2007 +Created at Wed Aug 15 16:13:41 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/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed index a71a9e2..645fac3 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/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/E/EU/EUXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed -Created at Sat Jul 7 11:15:17 2007 +Created at Wed Aug 15 16:13:41 2007 ######################################################################### __UU__ M'XL("`DY34("`T9O;RU"87(M,"XP,2YT87(`[5IK3]M(%,U7YE='0`E=-1:]LP$`#@=_^* 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 82e35f5..f346e34 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 Sat Jul 7 11:15:18 2007 +Created at Wed Aug 15 16:13:41 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 cb0c649..497a912 100644 --- a/lib/CPANPLUS/t/inc/conf.pl +++ b/lib/CPANPLUS/t/inc/conf.pl @@ -104,7 +104,11 @@ use constant TEST_CONF_MIRROR_DIR => 'dummy-localmirror'; sub gimme_conf { - my $conf = CPANPLUS::Configure->new(); + + ### don't load any other configs than the heuristic one + ### during tests. They might hold broken/incorrect data + ### for our test suite. Bug [perl #43629] showed this. + my $conf = CPANPLUS::Configure->new( load_configs => 0 ); $conf->set_conf( hosts => [ { path => 'dummy-CPAN', scheme => 'file',