# at the command prompt, assuming we're already in the top-level directory
# containing all the perl source files... Be advised: this won't work until
# you remove all the comments
grep -rhP '\buse\b' * | \ # find "use"-like statements
perl -E 'say $_ =~ /\buse\s+([\w:]+)/ for <>;' | \ # find the modules being used
sort | \ # weed out...
uniq | \ # ...any duplicates
while read packname; # and start looping through the results
do
perldoc -l $packname 2>&-; # ask perldoc where source file is, ignore errors
done | \
grep -v '.pod$' | \ # exclude pod files from the results; they are not modules
while read packfile; # and loop through the results of the source file lookups
do
echo -n $packfile ' -> '; # here the real output begins. Show the filename:
grep -P '\$([\w:]){0,}VERSION\b\s+=\s{0,}[[:punct:]]{0,1}\d' $packfile;
# then ^^above^^ try your best to parse out the version number of the module
# which will then get sent to the terminal
done
####
grep -rhP '\buse\b' * | \
perl -E 'say $_ =~ /\buse\s+([\w:]+)/ for <>;' | \
sort | \
uniq | \
while read packname;
do
perldoc -l $packname 2>&-;
done | \
grep -v '.pod$' | \
while read packfile;
do
echo -n $packfile ' -> ';
grep -P '\$([\w:]){0,}VERSION\b\s+=\s{0,}[[:punct:]]{0,1}\d' $packfile;
done
####
grep -rhP '\buse\b' * | perl -E 'say $_ =~ /\buse\s+([\w:]+)/ for <>;' | sort | uniq | while read packname; do perldoc -l $packname 2>&-; done | grep -v '.pod$' | while read packfile; do echo -n $packfile ' -> '; grep -P '\$([\w:]){0,}VERSION\b\s+=\s{0,}[[:punct:]]{0,1}\d' $packfile; done
####
/usr/share/perl/5.10/English.pm > our $VERSION = '1.04';
/usr/share/perl/5.10/File/Find.pm > our $VERSION = '1.14';
/usr/lib/perl/5.10/File/Spec.pm > $VERSION = '3.40';
/usr/share/perl/5.10/File/Temp.pm > $VERSION = '0.22';
/usr/share/perl/5.10/FindBin.pm > $VERSION = "1.50";
/usr/local/share/perl/5.10.1/Module/Build.pm > $VERSION = '0.4003';
/usr/local/share/perl/5.10.1/Pod/Coverage/TrustPod.pm > $Pod::Coverage::TrustPod::VERSION = '0.100002';
/usr/share/perl/5.10/subs.pm > our $VERSION = '1.00';
/usr/local/share/perl/5.10.1/Test/CPAN/Changes.pm > our $VERSION = '0.19';
/usr/local/share/perl/5.10.1/Test/CPAN/Meta.pm > $VERSION = '0.22';
/usr/local/share/perl/5.10.1/Test/CPAN/Meta/JSON.pm > $VERSION = '0.14';
/usr/local/share/perl/5.10.1/Test/DistManifest.pm > $Test::DistManifest::VERSION = '1.012';
/usr/local/share/perl/5.10.1/Test/Fatal.pm > $Test::Fatal::VERSION = '0.010';
/usr/local/share/perl/5.10.1/Test/Kwalitee.pm > $VERSION = '1.01';
/usr/local/share/perl/5.10.1/Test/MinimumVersion.pm > $Test::MinimumVersion::VERSION = '0.101080';
/usr/local/share/perl/5.10.1/Test/Mojibake.pm > our $VERSION = '0.7'; # VERSION
/usr/local/share/perl/5.10.1/Test/More.pm > our $VERSION = '0.98';
/usr/local/share/perl/5.10.1/Test/NoTabs.pm > $VERSION = '1.3';
/usr/local/share/perl/5.10.1/Test/NoWarnings.pm > $VERSION = '1.04';
/usr/local/share/perl/5.10.1/Test/Perl/Critic.pm > our $VERSION = 1.02;
/usr/local/share/perl/5.10.1/Test/Pod.pm > our $VERSION = '1.45';
/usr/local/share/perl/5.10.1/Test/Pod/Coverage.pm > our $VERSION = "1.08";
/usr/local/share/perl/5.10.1/Test/Portability/Files.pm > $Test::Portability::Files::VERSION = '0.06';
/usr/local/share/perl/5.10.1/Test/Script.pm > $VERSION = '1.07';
/usr/local/share/perl/5.10.1/Test/Vars.pm > our $VERSION = '0.002';
/usr/local/share/perl/5.10.1/Test/Version.pm > our $VERSION = '1.002001'; # VERSION