Subject: | patch for corelist.pl (adds -a switch ) |
patch for corelist.pl (adds -a switch )
--- corelist 2003-04-22 07:51:49.000000000 -0700
+++ corelist.pl 2003-11-11 07:24:40.578125000 -0800
@@ -10,11 +10,20 @@
=head1 SYNOPSIS
- corelist [-help] [-man] [-v [ version ] ] [ Modulename [ version ] ]
+ corelist [-help] [-a] [-man] [-v [ version ]] [ Modulename [ version ]]
=head1 OPTIONS
-=head2 [-?]
+=head2 a
+
+ corelist -a utf8
+
+ utf8 was first released with perl 5.006
+ 5.006001 undef
+ 5.007003 1.00
+ 5.008 1.00
+
+=head2 -?
help! help! help! to see more help, try --man.
@@ -39,7 +48,7 @@
my %Opts;
-GetOptions(\%Opts, qw[ help|?! man! v|version:f ] );
+GetOptions(\%Opts, qw[ help|?! man! v|version:f a! ] );
pod2usage(1) if $Opts{help};
pod2usage(-verbose=>2) if $Opts{man};
@@ -62,8 +71,9 @@
}elsif(@ARGV){
module_version(@ARGV);
} else {
- pod2usage(0)
+ pod2usage(0);
}
+
exit();
sub module_version {
@@ -83,6 +93,20 @@
}
print "\n",$msg,"\n";
+
+ if(defined $ret and exists $Opts{a} and $Opts{a}){
+ for my $v(
+ grep { $ret ne $_ }
+ sort keys %Module::CoreList::version ){
+
+ printf " %-10s %-10s\n",
+ $v,
+ $Module::CoreList::version{$v}{$mod}
+ || 'undef'
+ if exists $Module::CoreList::version{$v}{$mod};
+ }
+ print "\n";
+ }
}