diff options
author | Chris Williams <chris@bingosnet.co.uk> | 2009-10-27 10:07:35 +0000 |
---|---|---|
committer | Chris Williams <chris@bingosnet.co.uk> | 2009-10-27 10:07:35 +0000 |
commit | 34861f291d6c548304b74dfc30ff27447f1b582f (patch) | |
tree | 1557f3b1f5d44dfd0ba7240cc86871d7a72fc0a3 /cpan | |
parent | a8b2c106f7c4e82cbfd4fd5b0032b50f9499a67e (diff) | |
download | perl-34861f291d6c548304b74dfc30ff27447f1b582f.tar.gz |
Update CPANPLUS to cpan version 0.89_05
Changes for 0.89_05 Tue Oct 27 09:24:55 2009
================================================
* Change the way editing config files is called. This fixes RT #50832,
reported by Dave Golden
* Issue a warning in the shell if we are on MSWin32, don't have IPC::Run
installed and are writing a log file.
* Apply several patches from Alexandr Ciornii (CHORNY) RT #48636 that
add toolchain versions listing to tester reports.
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/CPANPLUS/lib/CPANPLUS.pm | 2 | ||||
-rw-r--r-- | cpan/CPANPLUS/lib/CPANPLUS/Internals.pm | 2 | ||||
-rw-r--r-- | cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants/Report.pm | 52 | ||||
-rw-r--r-- | cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm | 3 | ||||
-rw-r--r-- | cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm | 13 | ||||
-rw-r--r-- | cpan/CPANPLUS/t/40_CPANPLUS-Internals-Report.t | 10 |
6 files changed, 78 insertions, 4 deletions
diff --git a/cpan/CPANPLUS/lib/CPANPLUS.pm b/cpan/CPANPLUS/lib/CPANPLUS.pm index 20f5f8a610..5fc9ec8a8c 100644 --- a/cpan/CPANPLUS/lib/CPANPLUS.pm +++ b/cpan/CPANPLUS/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.89_04"; #have to hardcode or cpan.org gets unhappy + $VERSION = "0.89_05"; #have to hardcode or cpan.org gets unhappy } ### purely for backward compatibility, so we can call it from the commandline: diff --git a/cpan/CPANPLUS/lib/CPANPLUS/Internals.pm b/cpan/CPANPLUS/lib/CPANPLUS/Internals.pm index 75c7f9541f..8657941762 100644 --- a/cpan/CPANPLUS/lib/CPANPLUS/Internals.pm +++ b/cpan/CPANPLUS/lib/CPANPLUS/Internals.pm @@ -42,7 +42,7 @@ use vars qw[@ISA $VERSION]; CPANPLUS::Internals::Report ]; -$VERSION = "0.89_04"; +$VERSION = "0.89_05"; =pod diff --git a/cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants/Report.pm b/cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants/Report.pm index 07f898dd8e..6ad577c016 100644 --- a/cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants/Report.pm +++ b/cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants/Report.pm @@ -311,6 +311,58 @@ managed to load: return $str; }; +use constant REPORT_TOOLCHAIN_VERSIONS + => sub { + my $mod = shift; + my $cb = $mod->parent; + #die unless $cb->isa('CPANPLUS::Backend'); + + my @toolchain_modules= qw( + CPANPLUS + CPANPLUS::Dist::Build + Cwd + ExtUtils::CBuilder + ExtUtils::Command + ExtUtils::Install + ExtUtils::MakeMaker + ExtUtils::Manifest + ExtUtils::ParseXS + File::Spec + Module::Build + Test::Harness + Test::More + version + ); + + my @toolchain = + grep { $_ } #module_tree returns '' when module is not found + map { $cb->module_tree($_) } + sort @toolchain_modules; + + ### no prereqs? + return '' unless @toolchain; + + ### toolchain modules + my $str = << "."; + +Perl module toolchain versions installed: +. + $str .= join '', + map { sprintf "\t%-30s %8s\n", + @$_ + + } ['Module Name', 'Have'], + map { + [ $_->name, + $_->installed_version, + ], + ### might be empty entries in there + } @toolchain; + + return $str; + }; + + use constant REPORT_TESTS_SKIPPED => sub { return << "."; diff --git a/cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm b/cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm index 312a83c482..a1fe92123a 100644 --- a/cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm +++ b/cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm @@ -477,6 +477,9 @@ sub _send_report { ### add a list of what modules have been loaded of your prereqs list $message .= REPORT_LOADED_PREREQS->($mod); + ### add a list of versions of toolchain modules + $message .= REPORT_TOOLCHAIN_VERSIONS->($mod); + ### the footer $message .= REPORT_MESSAGE_FOOTER->(); diff --git a/cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm b/cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm index 5384b6ad26..fda2548440 100644 --- a/cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm +++ b/cpan/CPANPLUS/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.89_04"; + $VERSION = "0.89_05"; } load CPANPLUS::Shell; @@ -914,6 +914,15 @@ sub _install { ### would you like a log file of what happened? if( $conf->get_conf('write_install_logs') ) { + if ( ON_WIN32 and !check_install( + module => 'IPC::Run', version => 0.55 ) + ) { + error(loc("IPC::Run version '%1' is required on MSWin32" + . " in order to capture buffers." + . " The logfile generated may not contain" + . " any useful data, until it is installed", 0.55)); + } + my $dir = File::Spec->catdir( $conf->get_conf('base'), $conf->_get_build('install_log_dir'), @@ -1264,7 +1273,7 @@ sub _set_conf { }->{ $key } || CONFIG_USER; my $file = $conf->_config_pm_to_file( $where ); - system("$editor $file"); + system($editor,$file); ### now reload it ### disable warnings for this diff --git a/cpan/CPANPLUS/t/40_CPANPLUS-Internals-Report.t b/cpan/CPANPLUS/t/40_CPANPLUS-Internals-Report.t index d7c2bd81cd..ecce8a5b7c 100644 --- a/cpan/CPANPLUS/t/40_CPANPLUS-Internals-Report.t +++ b/cpan/CPANPLUS/t/40_CPANPLUS-Internals-Report.t @@ -304,6 +304,16 @@ my $map = { like($str, qr/\! $ModPrereq\s+\S+\s+\S+/, " Proper content found" ); } + + { my $clone = $Mod->clone; + + my $str = REPORT_TOOLCHAIN_VERSIONS->( $clone ); + + like($str, qr/toolchain/, "Correct message in report" ); + use Cwd; + like($str, qr/Cwd\s+\Q$Cwd::VERSION\E/, + "Cwd has correct version in report" ); + } } ### callback tests |