Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 48636
Status: resolved
Worked: 30 min
Priority: 0/
Queue: CPANPLUS

People
Owner: BINGOS [...] cpan.org
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: including toolchain modules versions in report
Patched version 0.88 (from repository) to include versions of several toolchain modules in cpantesters report. -- Alexandr Ciornii, http://chorny.net
Subject: Report.pm.patch
--- Report.-revBASE.svn002.tmp.pm Ñð àâã 12 02:02:10 2009 +++ D:/OSS/repo/CPANPLUS/lib/CPANPLUS/Internals/Report.pm Ñð àâã 12 01:12:12 2009 @@ -464,6 +464,9 @@ ### 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->();
Subject: Constants-Report.pm.patch
--- Report.p-revBASE.svn001.tmp.pm Ñð àâã 12 01:01:42 2009 +++ D:/OSS/repo/CPANPLUS/lib/CPANPLUS/Internals/Constants/Report.pm Ñð àâã 12 00:52:49 2009 @@ -311,6 +311,43 @@ return $str; }; +use constant REPORT_TOOLCHAIN_VERSIONS + => sub { + my $mod = shift; + my $cb = $mod->parent; + #die unless $cb->isa('CPANPLUS::Backend'); + + my @toolchain_modules=('CPANPLUS','Module::Build', + 'ExtUtils::MakeMaker','version','Cwd'); + 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 << ".";
Subject: 40_CPANPLUS-Internals-Report.t.patch
--- 40_CPANPLUS-Internals-Report.-revBASE.svn001.tmp.t Ñð àâã 12 01:02:51 2009 +++ D:/OSS/repo/CPANPLUS/t/40_CPANPLUS-Internals-Report.t Ñð àâã 12 00:50:25 2009 @@ -304,6 +304,16 @@ 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
Thanks for this! I've applied the patches to the repository and anticipate a CPAN development release (0.89_05) tommorrow. many thanks.