Hooray for Module::CoreList

petdance on 2003-04-07T02:19:18

Module::CoreList is a tremendous boon for module authors. It tracks what modules were in the Perl core for each version. I've had occassion to use it twice now:

What differences are there in core modules between Perl 5.5 and 5.8? #!/usr/bin/perl -w

use strict; use Module::CoreList;

my $list = $Module::CoreList::version{5.008};

my $old = $Module::CoreList::version{5.005};

for my $module ( sort keys %$list ) { print "$module\n" unless $old->{$module}; #printf( "%-20s %-10s %-10s\n", $module, $list->{$module} || "", $old->{$module} || "" ); }

When did Pod::Usage get put in the core? use strict; use Module::CoreList;

my @vers = sort keys %Module::CoreList::version;

for my $ver ( @vers ) { print $ver, " --> ", $Module::CoreList::version{$ver}->{'Pod::Usage'} || "no", "\n"; }


useful little thing i use ( bin/earliest )

koschei on 2003-04-07T02:22:37


#!/usr/bin/perl -w
use strict;
use Module::CoreList;

my $mod = shift;
$mod =~ s/-/::/g;
my $earliest = Module::CoreList->first_release( $mod );
die "Not a core module.\n" unless $earliest;

for my $key (sort keys %Module::CoreList::version)
{
        next unless exists $Module::CoreList::version{$key}{$mod};
        my $version = $Module::CoreList::version{$key}{$mod}
        || 'an unknown version';
        print "Perl $key has $mod $version\n";
}

I wonder...

jhi on 2003-04-14T11:43:27

...that if Module::CoreList would be added to the core, would an infinite recursion ensue?