Skip to content

Instantly share code, notes, and snippets.

@jnbek
Created March 8, 2012 17:04
Show Gist options
  • Save jnbek/2002090 to your computer and use it in GitHub Desktop.
Save jnbek/2002090 to your computer and use it in GitHub Desktop.
Better Dump All Perl Modules Installed
perl -MFile::Find=find -Tlwe 'for $inc (@INC) { find { wanted => sub { return if !/\.pm\z/; ($a=$File::Find::name)=~s|^\Q$inc\E/||; $a =~ s/\//::/g; $a =~ s/(.*)\.pm$//g;print $1 }, no_chdir => 1 }, $inc }'
@jnbek
Copy link
Author

jnbek commented Mar 8, 2012

Paul Seamons helped me strip off the @inc directories from the returned value so I could make the module, look like Perl wants it to, so you can eval { require } it or whatever you want with the mod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment