From: Rafael Garcia-Suarez Date: Thu, 5 Oct 2006 08:43:25 +0000 (+0000) Subject: Upgrade to Module::CoreList 2.09: X-Git-Tag: perl-5.9.5~2020 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/87fbace95be9589b7b2c6e7ed7bd681adeae2cf4?ds=sidebyside Upgrade to Module::CoreList 2.09: - make the dependency on version.pm optional - improve doc of corelist(1) p4raw-id: //depot/perl@28938 --- diff --git a/lib/Module/CoreList.pm b/lib/Module/CoreList.pm index b74dc81..add89ff 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 f2f1979..4949f1b 100644 --- a/lib/Module/CoreList/bin/corelist +++ b/lib/Module/CoreList/bin/corelist @@ -10,9 +10,9 @@ See L for one. =head1 SYNOPSIS - corelist -v [] + corelist -v corelist [-a] | // [] ... - corelist [-v ] [ | // ] ... + corelist [-v ] [ | // ] ... =head1 OPTIONS @@ -20,6 +20,9 @@ See L 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 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;