summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-05 08:43:25 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-05 08:43:25 +0000
commit87fbace95be9589b7b2c6e7ed7bd681adeae2cf4 (patch)
tree7777da414c40eaef7f4b9882aab389f33cb28498 /lib
parent454f88d07080031984440e04d14dc9e923d9fc32 (diff)
downloadperl-87fbace95be9589b7b2c6e7ed7bd681adeae2cf4.tar.gz
Upgrade to Module::CoreList 2.09:
- make the dependency on version.pm optional - improve doc of corelist(1) p4raw-id: //depot/perl@28938
Diffstat (limited to 'lib')
-rw-r--r--lib/Module/CoreList.pm2
-rw-r--r--lib/Module/CoreList/bin/corelist16
2 files changed, 13 insertions, 5 deletions
diff --git a/lib/Module/CoreList.pm b/lib/Module/CoreList.pm
index b74dc815d2..add89ff93c 100644
--- a/lib/Module/CoreList.pm
+++ b/lib/Module/CoreList.pm
@@ -1,7 +1,7 @@
package Module::CoreList;
use strict;
use vars qw/$VERSION %released %patchlevel %version %families/;
-$VERSION = '2.08';
+$VERSION = '2.09';
=head1 NAME
diff --git a/lib/Module/CoreList/bin/corelist b/lib/Module/CoreList/bin/corelist
index f2f19798ba..4949f1b65a 100644
--- a/lib/Module/CoreList/bin/corelist
+++ b/lib/Module/CoreList/bin/corelist
@@ -10,9 +10,9 @@ See L<Module::CoreList> for one.
=head1 SYNOPSIS
- corelist -v [<PerlVersion>]
+ corelist -v
corelist [-a] <ModuleName> | /<ModuleRegex>/ [<ModuleVersion>] ...
- corelist [-v <PerlVersion>] [ <ModuleName> | /<ModuleNameRegex>/ ] ...
+ corelist [-v <PerlVersion>] [ <ModuleName> | /<ModuleRegex>/ ] ...
=head1 OPTIONS
@@ -20,6 +20,9 @@ See L<Module::CoreList> for one.
=item -a modulename
+lists all versions of the given module (or the matching modules, in case you
+used a module regexp) in the perls Module::CoreList knows about.
+
corelist -a utf8
utf8 was first released with perl 5.006
@@ -53,8 +56,10 @@ all of the help
lists all of the perl release versions we got the CoreList for.
-If you pass a version argument (value of C<$]>, like 5.00503),
+If you pass a version argument (value of C<$]>, like C<5.00503> or C<5.008008>),
you get a list of all the modules and their respective versions.
+(If you have the C<version> module, you can also use new-style version numbers,
+like C<5.8.8>.)
In module filtering context, it can be used as Perl version filter.
@@ -67,7 +72,6 @@ use Getopt::Long;
use Pod::Usage;
use strict;
use warnings;
-use version ();
my %Opts;
@@ -178,6 +182,10 @@ sub module_version {
sub numify_version {
my $ver = shift;
if ( index( $ver, q{.}, index( $ver, q{.} ) ) >= 0 ) {
+ eval { require version };
+ if ($@) {
+ die "You need to install version.pm to use dotted version numbers\n";
+ }
$ver = version->new($ver)->numify;
}
return $ver;