Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

(jeffa) Re: Favourite modules

by jeffa (Chancellor)
on Mar 10, 2002 at 16:31 UTC ( #150728=note: print w/ replies, xml ) Need Help??


in reply to Favourite modules March 2002

strict

Super module number 1!

jeffa

the hell it don't count!

Ok ok, here are some more:

And the plug (and it really is a fav of mine): update - i ran a script that scanned all .pl and .cgi files to see which modules i use the most (using Perl to make up my mind ;)). So, using Juerd's rules this time:
  1. Data::Dumper (102)
  2. CGI (81)
  3. DBI (52)
  4. IO::File (31)
  5. Getopt::Std (24)
  6. CGI::Carp (24)
  7. LWP::Simple (22)
  8. HTTP::Request::Common (20)
  9. LWP (17)
  10. SOAP::Lite (15)
Per demerphq's request - here it is. If anybody feels like making an improvement or two, then ++'s for you. I do know that this code trudges through perldoc as well as code ... that needs to be fixed.
#!/usr/bin/perl -w use strict; use File::Find; @ARGV = (); my %mod = (); # does this look familiar merlyn? :) find sub { push @ARGV, $File::Find::name if /\.pl\z/ or /\.cgi\z/; }, qw(/dirs /to/scan/here); while (<>) { $mod{$1}++ if /use\s+([A-Za-z_:]+);/; } # top 20 so i can filter out those that don't count :P print "Top Twenty:\n"; print map {"<li>[kobe://$_] ($mod{$_})\n"} (sort {$mod{$b} <=> $mod{$a +}} keys %mod)[0..19];


Comment on (jeffa) Re: Favourite modules
Download Code
Re: (jeffa) Re: Favourite modules
by demerphq (Chancellor) on Mar 11, 2002 at 12:56 UTC
Re: (jeffa) Re: Favourite modules
by rnahi (Curate) on Mar 12, 2002 at 12:09 UTC
    Not airtight, but it will skip the POD.
    my $in_pod=0; my $argcount = scalar @ARGV; while (<>) { # deals with uncorrect POD left open at the end # of the file if ($argcount > scalar @ARGV) { $in_pod=0; $argcount--; } if ($in_pod) { $in_pod = not /^=cut/; } else { $in_pod = /^=\w/; } next if $in_pod; # skip lines inside POD $mod{$1}++ if /use\s+([A-Za-z_:]+);/; }
Re: (jeffa) Re: Favourite modules
by gellyfish (Monsignor) on Mar 12, 2002 at 17:12 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://150728]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2014-08-28 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (259 votes), past polls