Skip to content

Instantly share code, notes, and snippets.

@kentfredric
Created November 20, 2010 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentfredric/e3896a4a96e931fa7c61 to your computer and use it in GitHub Desktop.
Save kentfredric/e3896a4a96e931fa7c61 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use warnings;
use strict;
use Class::Load qw( try_load_class );
use Carp qw();
use Package::Stash;
for my $module ( @ARGV ) {
if ( not try_load_class( $module ) ) {
printf "Can't load %s\n";
Carp::carp $Class::Load::ERROR;
next;
}
printf "%s ( Version %s ) => %s\n",
$module,
Package::Stash->new($module)->get_package_symbol('$VERSION'),
$INC{ Class::Load::_mod2pm( $module ) };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment