Created
March 8, 2012 17:04
-
-
Save jnbek/2002090 to your computer and use it in GitHub Desktop.
Better Dump All Perl Modules Installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.