in reply to Favourite modules April 2003
Here, including my own stuff are my top 20 according to useage---
How do I know this? Fairly easy, go to the root of your Perl development tree on the box of your choice and append the results of 'grep -rd "^use " *.pl' to this:
#!/perl/bin/perl # # use.pl -- statistics for 'use' module name. use strict; use warnings; use diagnostics; my %module; my @list; while (<DATA>) { if (/^use\s(.*?);/) { my $what = $1; if ($what =~ /^lib/) { $module{'lib'}++; } elsif ($what =~ /^constant/) { $module{'constant'}++; } else { $module{$what}++; } } } for (keys %module) { push(@list,sprintf("%04d|%s",$module{$_},$_)); } for (sort @list) { my($howmany,$what) = split /\|/; print "$howmany, $what\n"; } __DATA__
And then run the script...
--hsm
"Never try to teach a pig to sing...it wastes your time and it annoys the pig."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Favourite modules April 2003 (scripted top10 list)
by Aristotle (Chancellor) on Apr 16, 2003 at 00:43 UTC | |
Re: Re: Favourite modules April 2003
by zakzebrowski (Curate) on Apr 17, 2003 at 12:21 UTC |