From: Jos I. Boumans Date: Sun, 17 Jun 2007 14:39:29 +0000 (+0200) Subject: CPANPLUS 0.80 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=983ffab67b2cbb8cb83f2d98d3ed046c5761e2a4;p=p5sagit%2Fp5-mst-13.2.git CPANPLUS 0.80 From: "Jos I. Boumans" Message-Id: <45B1EC67-D34B-404D-9801-449FAC1D75BA@dwim.org> p4raw-id: //depot/perl@31401 --- diff --git a/MANIFEST b/MANIFEST index 1484de5..dfd1bd4 100644 --- a/MANIFEST +++ b/MANIFEST @@ -25,16 +25,16 @@ configure.com Configure-equivalent for VMS configure.gnu Crude emulation of GNU configure cop.h Control operator header Copying The GNU General Public License +Cross/build-arm-n770-sh Cross-compilation +Cross/cflags-cross-arm Cross-compilation Cross/config Cross-compilation Cross/config.sh-arm-linux Cross-compilation Cross/config.sh-arm-linux-n770 Cross-compilation -Cross/build-arm-n770-sh Cross-compilation Cross/generate_config_sh Cross-compilation Cross/installperl.patch Cross-compilation Cross/Makefile Cross-compilation -Cross/Makefile.SH.patch Cross-compilation Cross/Makefile-cross-SH Cross-compilation -Cross/cflags-cross-arm Cross-compilation +Cross/Makefile.SH.patch Cross-compilation Cross/README Cross-compilation Cross/README.new Cross-compilation Cross/TODO Cross-compilation diff --git a/lib/CPANPLUS.pm b/lib/CPANPLUS.pm index ba9737b..585d051 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.79_04"; #have to hardcode or cpan.org gets unhappy + $VERSION = "0.80"; #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/Internals.pm b/lib/CPANPLUS/Internals.pm index ee5280e..9c3b651 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.79_04"; +$VERSION = "0.80"; =pod diff --git a/lib/CPANPLUS/Shell/Default.pm b/lib/CPANPLUS/Shell/Default.pm index 1bf1bfb..b39a3a6 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.79_04"; + $VERSION = "0.80"; } load CPANPLUS::Shell; diff --git a/lib/CPANPLUS/t/01_CPANPLUS-Configure.t b/lib/CPANPLUS/t/01_CPANPLUS-Configure.t index 274e04f..fc02640 100644 --- a/lib/CPANPLUS/t/01_CPANPLUS-Configure.t +++ b/lib/CPANPLUS/t/01_CPANPLUS-Configure.t @@ -9,8 +9,6 @@ use Data::Dumper; use strict; use CPANPLUS::Internals::Constants; -### purposely avert messages and errors to a file? ### -my $Trap_Output = @ARGV ? 0 : 1; my $Config_pm = 'CPANPLUS/Config.pm'; ### DO NOT FLUSH TILL THE END!!! we depend on all warnings being logged.. @@ -106,9 +104,7 @@ for my $cat ( $r->ls_accessors ) { } -{ local $CPANPLUS::Error::ERROR_FH = output_handle() if $Trap_Output; - - my $env = ENV_CPANPLUS_CONFIG; +{ my $env = ENV_CPANPLUS_CONFIG; local $ENV{$env} = $$; my $ok = $c->init; my $stack = CPANPLUS::Error->stack_as_string; @@ -119,9 +115,7 @@ for my $cat ( $r->ls_accessors ) { } -{ local $CPANPLUS::Error::ERROR_FH = output_handle() if $Trap_Output; - - CPANPLUS::Error->flush; +{ CPANPLUS::Error->flush; { ### try a bogus method call my $x = $c->flubber('foo'); diff --git a/lib/CPANPLUS/t/02_CPANPLUS-Internals.t b/lib/CPANPLUS/t/02_CPANPLUS-Internals.t index 57a26c2..29bf2ff 100644 --- a/lib/CPANPLUS/t/02_CPANPLUS-Internals.t +++ b/lib/CPANPLUS/t/02_CPANPLUS-Internals.t @@ -86,9 +86,7 @@ is($cb->_id, $cb->_last_id, "Comparing ID's"); for my $callback ( keys %$callback_map ) { - { local $CPANPLUS::Error::ERROR_FH = output_handle() unless @ARGV; - - my $rv = $callback_map->{$callback}; + { my $rv = $callback_map->{$callback}; is( $rv, $cb->_callbacks->$callback->( $0, $$ ), "Default callback '$callback' called" ); diff --git a/lib/CPANPLUS/t/04_CPANPLUS-Module.t b/lib/CPANPLUS/t/04_CPANPLUS-Module.t index 81874dd..7415033 100644 --- a/lib/CPANPLUS/t/04_CPANPLUS-Module.t +++ b/lib/CPANPLUS/t/04_CPANPLUS-Module.t @@ -16,9 +16,6 @@ use Test::More 'no_plan'; use Data::Dumper; use File::Path (); -### silence errors, unless you tell us not to ### -local $CPANPLUS::Error::ERROR_FH = output_handle() unless @ARGV; - my $Conf = gimme_conf(); my $CB = CPANPLUS::Backend->new( $Conf ); diff --git a/lib/CPANPLUS/t/05_CPANPLUS-Internals-Fetch.t b/lib/CPANPLUS/t/05_CPANPLUS-Internals-Fetch.t index f58b932..1489b25 100644 --- a/lib/CPANPLUS/t/05_CPANPLUS-Internals-Fetch.t +++ b/lib/CPANPLUS/t/05_CPANPLUS-Internals-Fetch.t @@ -17,10 +17,6 @@ use CPANPLUS::Internals::Constants; my $conf = gimme_conf(); -### Redirect errors to file ### -local $CPANPLUS::Error::ERROR_FH = output_handle() unless @ARGV; -local $CPANPLUS::Error::MSG_FH = output_handle() unless @ARGV; - my $cb = CPANPLUS::Backend->new( $conf ); isa_ok($cb, "CPANPLUS::Internals" ); diff --git a/lib/CPANPLUS/t/08_CPANPLUS-Backend.t b/lib/CPANPLUS/t/08_CPANPLUS-Backend.t index 571a530..947ea84 100644 --- a/lib/CPANPLUS/t/08_CPANPLUS-Backend.t +++ b/lib/CPANPLUS/t/08_CPANPLUS-Backend.t @@ -14,9 +14,6 @@ use CPANPLUS::Internals::Constants; my $conf = gimme_conf(); -### purposely avert messages and errors to a file? ### -my $Trap_Output = @ARGV ? 0 : 1; - my $Class = 'CPANPLUS::Backend'; ### D::C has troubles with the 'use_ok' -- it finds the wrong paths. ### for now, do a 'use' instead @@ -133,10 +130,7 @@ ok( IS_CONFOBJ->(conf => $conf_obj), "Configure object found" ); ### test for things that look like real modules, but aren't ### - { local $CPANPLUS::Error::MSG_FH = output_handle() if $Trap_Output; - local $CPANPLUS::Error::ERROR_FH = output_handle() if $Trap_Output; - - my @map = ( + { my @map = ( [ $Name . $$ => [ [qr/does not contain an author/,"Missing author part detected"], [qr/Cannot find .+? in the module tree/,"Unable to find module"] diff --git a/lib/CPANPLUS/t/10_CPANPLUS-Error.t b/lib/CPANPLUS/t/10_CPANPLUS-Error.t index 8a954e7..800a126 100644 --- a/lib/CPANPLUS/t/10_CPANPLUS-Error.t +++ b/lib/CPANPLUS/t/10_CPANPLUS-Error.t @@ -34,8 +34,9 @@ my $map = { ### global variables test ### { my $file = output_file(); - unlink $file; # just in case + ### this *has* to be set, as we're testing the contents of the file + ### to see if it matches what's stored in the buffer. local $CPANPLUS::Error::MSG_FH = output_handle(); local $CPANPLUS::Error::ERROR_FH = output_handle(); diff --git a/lib/CPANPLUS/t/19_CPANPLUS-Dist.t b/lib/CPANPLUS/t/19_CPANPLUS-Dist.t index 4c48fca..3e35a54 100644 --- a/lib/CPANPLUS/t/19_CPANPLUS-Dist.t +++ b/lib/CPANPLUS/t/19_CPANPLUS-Dist.t @@ -26,9 +26,9 @@ BEGIN { _prepare_args _install_args _create_args]); return $Init }; sub format_available { return $Available } - sub prepare { return shift->status->prepared($Prepare) } - sub create { return shift->status->created($Create) } - sub install { return shift->status->installed($Install) } + sub prepare { return shift->status->prepared( $Prepare ) } + sub create { return shift->status->created( $Create ) } + sub install { return shift->status->installed( $Install ) } } use strict; @@ -47,10 +47,6 @@ use Module::Load::Conditional qw[check_install]; my $conf = gimme_conf(); my $cb = CPANPLUS::Backend->new( $conf ); -### Redirect errors to file ### -local $CPANPLUS::Error::ERROR_FH = output_handle() unless @ARGV; -local $CPANPLUS::Error::MSG_FH = output_handle() unless @ARGV; - ### obsolete #my $Format = '_test'; my $Module = 'CPANPLUS::Dist::_Test'; diff --git a/lib/CPANPLUS/t/20_CPANPLUS-Dist-MM.t b/lib/CPANPLUS/t/20_CPANPLUS-Dist-MM.t index 9516cc0..5ba3e3f 100644 --- a/lib/CPANPLUS/t/20_CPANPLUS-Dist-MM.t +++ b/lib/CPANPLUS/t/20_CPANPLUS-Dist-MM.t @@ -40,8 +40,6 @@ $cb->_callbacks->send_test_report( sub { 0 } ); $conf->set_conf( cpantest => 0 ); ### Redirect errors to file ### -local $CPANPLUS::Error::ERROR_FH = output_handle() unless $Verbose; -local $CPANPLUS::Error::MSG_FH = output_handle() unless $Verbose; *STDERR = output_handle() unless $Verbose; ### dont uncomment this, it screws up where STDOUT goes and makes diff --git a/lib/CPANPLUS/t/21_CPANPLUS-Dist-No-Build.t b/lib/CPANPLUS/t/21_CPANPLUS-Dist-No-Build.t index c4d1b5a..c818338 100644 --- a/lib/CPANPLUS/t/21_CPANPLUS-Dist-No-Build.t +++ b/lib/CPANPLUS/t/21_CPANPLUS-Dist-No-Build.t @@ -34,10 +34,7 @@ ok( not grep { $_ eq INSTALLER_BUILD } CPANPLUS::Dist->dist_types, } ### extract it, silence warnings/messages -{ local $CPANPLUS::Error::MSG_FH = output_handle(); - local $CPANPLUS::Error::ERROR_FH = output_handle(); - - my $where = $Mod->extract; +{ my $where = $Mod->extract; ok( -e $where, " Tarball extracted to '$where'" ); } 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 a9d5101..e08012c 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 Tue May 29 08:55:16 2007 +Created at Sun Jun 17 14:15:09 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 2b37266..21bf801 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 Tue May 29 08:55:16 2007 +Created at Sun Jun 17 14:15:09 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 0f51d09..96cbf0e 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 Tue May 29 08:55:16 2007 +Created at Sun Jun 17 14:15:09 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/EUNOXS/perl5.005_03.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz.packed index a64fb86..3dee267 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/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/E/EU/EUNOXS/perl5.005_03.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz.packed -Created at Tue May 29 08:55:17 2007 +Created at Sun Jun 17 14:15:09 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/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 93c462f..9393b59 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 Tue May 29 08:55:17 2007 +Created at Sun Jun 17 14:15:09 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 01e0772..afee040 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 Tue May 29 08:55:17 2007 +Created at Sun Jun 17 14:15:10 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 87dcd29..cb0c649 100644 --- a/lib/CPANPLUS/t/inc/conf.pl +++ b/lib/CPANPLUS/t/inc/conf.pl @@ -51,6 +51,7 @@ BEGIN { use strict; use CPANPLUS::Configure; +use CPANPLUS::Error (); use File::Path qw[rmtree]; use FileHandle; @@ -150,6 +151,24 @@ sub gimme_conf { } sub output_file { return $file } + + + my $env = 'PERL5_CPANPLUS_TEST_VERBOSE'; + ### redirect output from msg() and error() output to file + unless( $ENV{$env} ) { + + print "# To run tests in verbose mode, set ". + "\$ENV{PERL5_CPANPLUS_TEST_VERBOSE} = 1\n" unless $ENV{PERL_CORE}; + + unlink $file; # just in case + + $CPANPLUS::Error::ERROR_FH = + $CPANPLUS::Error::ERROR_FH = output_handle(); + + $CPANPLUS::Error::MSG_FH = + $CPANPLUS::Error::MSG_FH = output_handle(); + + } } @@ -197,7 +216,7 @@ sub _clean_test_dir { ### regular file } else { - print "Deleting file '$path'\n" if $verbose; + print "# Deleting file '$path'\n" if $verbose; 1 while unlink $path; } }