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

(jeffa) Re: Favourite modules

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

in reply to Favourite modules March 2002


Super module number 1!


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];

Replies are listed 'Best First'.
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
Re: (jeffa) Re: Favourite modules
by demerphq (Chancellor) on Mar 11, 2002 at 12:56 UTC

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2021-05-12 17:32 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (132 votes). Check out past polls.