summaryrefslogtreecommitdiff
path: root/dist/Module-CoreList/corelist
diff options
context:
space:
mode:
authorChris Williams <chris@bingosnet.co.uk>2010-04-22 22:37:09 +0100
committerChris Williams <chris@bingosnet.co.uk>2010-04-22 22:37:09 +0100
commit044d64a877be884e81013d53b56accbddfe731cc (patch)
treee0648fc1fa10b41b07045ef1d1889ca7536627e2 /dist/Module-CoreList/corelist
parent8162142bfe8ad55439ff878b28c85e654d9a67d3 (diff)
downloadperl-044d64a877be884e81013d53b56accbddfe731cc.tar.gz
Fixes and new functions for Module::CoreList
Fixed functions will edge-case involving querying for Module::CoreList itself. Pointed out by Ilmari. Added removed_from() and removed_from_by_date() functions for querying which release a module was removed from core. Amended corelist utility to use new removed from functions when stating when a module entered core ( and when it left it ). Added tests to the testsuite to cover the edge-cases and new funcs.
Diffstat (limited to 'dist/Module-CoreList/corelist')
-rw-r--r--dist/Module-CoreList/corelist7
1 files changed, 6 insertions, 1 deletions
diff --git a/dist/Module-CoreList/corelist b/dist/Module-CoreList/corelist
index f1210e8454..08f198f4ac 100644
--- a/dist/Module-CoreList/corelist
+++ b/dist/Module-CoreList/corelist
@@ -173,10 +173,15 @@ sub module_version {
my $msg = $mod;
$msg .= " $ver" if $ver;
+ my $rem = $Opts{d}
+ ? Module::CoreList->removed_from_by_date($mod)
+ : Module::CoreList->removed_from($mod);
+
if( defined $ret ) {
$msg .= " was ";
$msg .= "first " unless $ver;
- $msg .= "released with perl $ret"
+ $msg .= "released with perl " . format_perl_version($ret);
+ $msg .= " and removed from " . format_perl_version($rem) if $rem;
} else {
$msg .= " was not in CORE (or so I think)";
}