From: David Golden Date: Mon, 21 Dec 2009 02:51:41 +0000 (-0500) Subject: hotfix App::Cpan X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=295f7fb33b9b51d201278d98cb356b6fc8c2baf3;p=p5sagit%2Fp5-mst-13.2.git hotfix App::Cpan Suppresses uninitialized warnings and NullLogger output. Changes have already been submitted to upstream repos. --- diff --git a/cpan/CPAN/lib/App/Cpan.pm b/cpan/CPAN/lib/App/Cpan.pm index bfa32e9..f290cc8 100644 --- a/cpan/CPAN/lib/App/Cpan.pm +++ b/cpan/CPAN/lib/App/Cpan.pm @@ -395,7 +395,7 @@ sub run package Local::Null::Logger; sub new { bless \ my $x, $_[0] } -sub AUTOLOAD { shift; print "NullLogger: ", @_, $/ } +sub AUTOLOAD { shift; print "NullLogger: ", @_, $/ if $ENV{CPAN_NULL_LOGGER} } sub DESTROY { 1 } } @@ -492,7 +492,7 @@ sub _hook_into_CPANpm_report *CPAN::Shell::myprint = sub { my($self,$what) = @_; - $scalar .= $what; + $scalar .= $what if defined $what; $self->print_ornamented($what, $CPAN::Config->{colorize_print}||'bold blue on_white', ); @@ -500,7 +500,7 @@ sub _hook_into_CPANpm_report *CPAN::Shell::mywarn = sub { my($self,$what) = @_; - $scalar .= $what; + $scalar .= $what if defined $what; $self->print_ornamented($what, $CPAN::Config->{colorize_warn}||'bold red on_white' );