1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-08 04:35:41 -04:00

modified core.pm

Conflicts:

	var/cache-fastmmap
	var/seen.db
This commit is contained in:
Ryan Voots 2010-11-27 17:17:03 -05:00
parent a4c316fae6
commit 7fcfa1ce1f

View file

@ -1,31 +1,45 @@
use Module::CoreList; BEGIN {
my ($filename) = "Module/CoreList.pm";
my ( $realfilename, $result );
ITER: {
foreach $prefix (@INC) {
$realfilename = "$prefix/$filename";
if ( -f $realfilename ) {
$INC{$filename} = $realfilename;
$result = do $realfilename;
last ITER;
}
}
die "Can't find $filename in \@INC";
}
}
sub { sub {
my( $said, $pm ) = @_; my ( $said, $pm ) = @_;
my $module = $said->{recommended_args}->[0]; my $module = $said->{recommended_args}->[0];
my $rev = Module::CoreList->first_release( $module ); my $rev = Module::CoreList->first_release($module);
if( $rev ) { if ($rev) {
print "Added to perl core as of $rev"; print "Added to perl core as of $rev";
if ( Module::CoreList->can('removed_from') ) { if ( Module::CoreList->can('removed_from') ) {
my $rem = Module::CoreList->removed_from( $module ); my $rem = Module::CoreList->removed_from($module);
print " and removed from $rem" if $rem; print " and removed from $rem" if $rem;
} }
} }
else { else {
my @modules = Module::CoreList->find_modules(qr/$module/); my @modules = Module::CoreList->find_modules(qr/$module/);
if ( @modules ){ if (@modules) {
print 'Found', scalar @modules, ':', join ',',
print 'Found', scalar @modules, ':', join ',' , map { $_ . ' in ' . Module::CoreList->first_release($_) }
map {$_.' in '. Module::CoreList->first_release( $_ ) } @modules; @modules;
} }
else { else {
print "Module $module does not appear to be in core. Perhaps capitalization matters or try using the 'cpan' command to search for it." } print "Module $module does not appear to be in core. Perhaps capitalization matters or try using the 'cpan' command to search for it.";
}
}
} }
}
__DATA__ __DATA__
Tells you when the module you searched for was added to the Perl Core, if it was. Tells you when the module you searched for was added to the Perl Core, if it was.