This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Module::CoreList 2.09:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 5 Oct 2006 08:43:25 +0000 (08:43 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 5 Oct 2006 08:43:25 +0000 (08:43 +0000)
- make the dependency on version.pm optional
- improve doc of corelist(1)

p4raw-id: //depot/perl@28938

lib/Module/CoreList.pm
lib/Module/CoreList/bin/corelist

index b74dc81..add89ff 100644 (file)
@@ -1,7 +1,7 @@
 package Module::CoreList;
 use strict;
 use vars qw/$VERSION %released %patchlevel %version %families/;
 package Module::CoreList;
 use strict;
 use vars qw/$VERSION %released %patchlevel %version %families/;
-$VERSION = '2.08';
+$VERSION = '2.09';
 
 =head1 NAME
 
 
 =head1 NAME
 
index f2f1979..4949f1b 100644 (file)
@@ -10,9 +10,9 @@ See L<Module::CoreList> for one.
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
-    corelist -v [<PerlVersion>]
+    corelist -v
     corelist [-a] <ModuleName> | /<ModuleRegex>/ [<ModuleVersion>] ...
     corelist [-a] <ModuleName> | /<ModuleRegex>/ [<ModuleVersion>] ...
-    corelist [-v <PerlVersion>] [ <ModuleName> | /<ModuleNameRegex>/ ] ...
+    corelist [-v <PerlVersion>] [ <ModuleName> | /<ModuleRegex>/ ] ...
 
 =head1 OPTIONS
 
 
 =head1 OPTIONS
 
@@ -20,6 +20,9 @@ See L<Module::CoreList> for one.
 
 =item -a modulename
 
 
 =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
     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.
 
 
 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.
 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.
 
 
 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 Pod::Usage;
 use strict;
 use warnings;
-use version ();
 
 my %Opts;
 
 
 my %Opts;
 
@@ -178,6 +182,10 @@ sub module_version {
 sub numify_version {
     my $ver = shift;
     if ( index( $ver, q{.}, index( $ver, q{.} ) ) >= 0 ) {
 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;
         $ver = version->new($ver)->numify;
     }
     return $ver;