Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Favourite modules March 2002

by Juerd (Abbot)
on Mar 10, 2002 at 16:28 UTC ( [id://150727]=perlmeditation: print w/replies, xml ) Need Help??

Perl Monks all over the world,

We know the power of modules, and we use modules a lot. Modules make our lifes easier, help us abstract code and they're often available from CPAN, or even included in the core distribution.

Not counting pragmata (strict and such), and not counting my own non-CPAN modules, I have my top 10 of favourite modules as follows:

  1. B::Deparse
  2. LWP::Simple
  3. IPC::Open3
  4. POE::Component::IRC
  5. DBI
  6. DBIx::Abstract
  7. POSIX
  8. Exporter
  9. Carp
  10. LWP::UserAgent

What are your favourite modules?

44696420796F7520732F2F2F65206F
7220756E7061636B3F202F6D736720
6D6521203A29202D2D204A75657264

Replies are listed 'Best First'.
(jeffa) Re: Favourite modules
by jeffa (Bishop) on Mar 10, 2002 at 16:31 UTC
    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];
      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: Favourite modules
by perrin (Chancellor) on Mar 10, 2002 at 19:01 UTC
    There was a talk by Simon Cozens called "10 Perl Modules I Wouldn't Go Anywhere Without", but I can't seem to find a copy on-line.

    These lists tend be a bit repetitive, so I'll try to slant mine a little. Here's my list of modules that I wouldn't use mod_perl without:

    • Template
    • Storable
    • Digest::MD5
    • Devel::DProf
    • Benchmark
    • Apache::SizeLimit
    • Apache::Resource
    • Apache::DB
    • Apache::SSI
    • DBIx::Profile
    • Cache::Cache
Re: Favourite modules
by Matts (Deacon) on Mar 10, 2002 at 17:15 UTC
    In no particular order:

    1. Fatal
    2. File::Spec
    3. Digest::MD5
    4. Time::Piece (ok, so I'm biased)
    5. DBI
    6. CookBookA && CookBookB (not really modules, but indispensible to anyone learning XS)
    7. POE
    8. Log::Dispatch::Config
    9. XML::SAX::Machines
    10. XML::Handler::AxPoint (biased again)

Re: Favourite modules
by derby (Abbot) on Mar 10, 2002 at 19:21 UTC
Re: Favourite modules
by dreadpiratepeter (Priest) on Mar 10, 2002 at 21:28 UTC
    In no particular order:
  • DBD::Chart
       You want to impress your boss and improve your reputation as a miracle worker? Casually mention on a friday afternoon that it would be cool if your system could generate graphs along with its normal reports. Friday evening spend 1 or 2 hours integrating DBD::Chart into your system. Revel in how easy it is. Relaxe for the rest of the weekend. Monday morning amaze your boss.
  • Tk
       But then again I'm an old GUI programmer...
  • HTML::Mason
       These days I'm an old web programmer. I can build amazing interfaces in almost no time with HTML::Mason.
  • Spreadsheet::ParseExcel, Spreadsheet::WriteExcel
       Another boss pleaser. Clients love it when they can save their reports as excel spreadsheets, with all the proper formating and justification.
  • Quantum::SuperPositions
       Powerful stuff if you can get your head around it.
  • DBI, LWP::Simple, CGI, HTML::Parser
       For the same reasons they are on everyone elses list.

    -pete
    "I am Jack's utter lack of disbelief"
Re: Favourite modules
by BazB (Priest) on Mar 10, 2002 at 19:41 UTC
Re: Favourite modules
by jryan (Vicar) on Mar 10, 2002 at 21:45 UTC

    Here are a few that have really saved my life:

    • CGI - I assume this and DBI need no introduction? :)
    • DBI
    • Storable - Really handy when you need to serialize data (in a db or otherwise). Take a look at it next time you need to store data in a weird format.
    • IO::Socket - Indispensible if you are doing any sort of socket stuff.
    • Net::Shared - Shameless plug time :) I really hate IPC::Shareable, so I created this module. Its still under development, but next time you need to use shared memory, give it look; its much more stable than its counterpart.
    • LWP - huge time saver.
    • File::Find - another huge time saver.
    • Apache::Session - a module that makes it much easier to implement sessions. Takes care of most issues for you automatically after its set up.
    • Mail::Mailer - My favorite mail sending module.
    • HTML::TokeParser - My preferred way to parse HTML.
Re: Favourite modules (Data::Dumper, two old sub-threads on CPAN.pm and modules)
by ybiC (Prior) on Mar 10, 2002 at 23:20 UTC
    Data::Dumper - stringified perl data structures, suitable for both printing and eval.   Written by Gurusamy Sarathy.

    tilly pointed me to this Fine Module a while back.   It's served me faithfully since then, as an excellent debugging tool when my perl isn't perling.   Data::Dumper is included in standard Perl distributions, so there are no excuses for *not* using it {grin}

    geektron reviewed Data::Dumper right here.

    Other modules I frequent:

    Update: For fresh perlers not familiar with installation and use of modules*, perusing the old sub-thread starting at "My Favorite Module: CPAN" might be beneficial.   But remember to upgrade CPAN.pm manually *before* actually using it to install other modules.   Nevermind that I'm a Luddite, preferring to install all my modules manually.   Heh.

    Update 2: davorg provides excellent instructions for getting your feet wet with Perl modules at "Re: difficulty using CPAN.pm".

        cheers,
        Don
        striving toward Perl Adept
        (it's pronounced "why-bick")

    * Old-timers here at the Monastery will recall when this was me {grin}

Re: Favourite modules
by strat (Canon) on Mar 10, 2002 at 21:38 UTC
    My favorite modules are (in no specific order):
    • strict, warnings, Carp (die over there :-))
    • Digest::MD5
    • Net::LDAP
    • Win32::ODBC
    • DBI
    • CGI
    • Storable
    • Class::MethodMaker
    • Data::Dumper
    • Win32::AdminMisc
    • IO::Select
    • Expect
    • POSIX
    • and for Fun: Tk

    Best regards,
    perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"

Re: Favourite modules
by rjray (Chaplain) on Mar 11, 2002 at 00:21 UTC

    Let's see-- excluding pragmata, but allowing references to core modules, and not being cheesy and referencing any of my own CPAN modules:

    1. Data::Dumper - So useful in debugging, I've set my PERL5DB environment variable to be, "BEGIN { use Data::Dumper; require 'perl5db.pl'; }".
    2. SOAP::Lite - Using it more and more each day
    3. HTTP::Daemon - I've lost count of how many applications I've written that use this for their network layer
    4. Perl/GTK+ bindings - if only the code were as stable as Perl/Tk
    5. mod_perl - I'm always learning some new trick I can do with this one
    6. B::Terse - the opcode tree has proven indispensible when debugging core-dumps inside XS code
    7. XML::SAX - starting to use this more and more
    8. Devel::Peek - another indispensible tool for the XS programmer
    9. AutoLoader - dynamic loading for Perl code is good, especially when your (legacy) library has 30+ functions
    10. Image::Size - OK, I'm cheating here. But I do a lot of HTML authoring for a local hobby club's website, and getting the image dimensions in a cut-and-paste form is very handy and very time-saving

    The ones that aren't linked are core modules, and you should be able to find their manual pages here or on your Perl installation. And yes, Image::Size is one of mine, but it really is one of my most-used pieces of code. And it was my very first CPAN submission, so I have a fondness for it.

    --rjray

Re: Favourite modules
by gellyfish (Monsignor) on Mar 10, 2002 at 22:11 UTC
Re: Favourite modules
by George_Sherston (Vicar) on Mar 11, 2002 at 07:56 UTC
    Part of the value of this thread is that one comes across modules one wouldn't otherwise have checked out. But I'm afraid I'm a meat-and-potatoes kinda guy, and my favourite list is very MOR. But none the worse for that. As Braque says, "all the ancient wisdoms were young once".
    • CGI
    • jbr::Carp - this is CGI::Carp but with a tiny tweak (replace line 285 print STDOUT "<!-- warning: $msg --> \n" with print STDOUT "warning: $msg <BR>\n") to put warnings in the browser rather than in comments - just the way I like to debug
    • DBI - for placeholders, and for everything else
    • HTML::Template - the lowest learn : do ratio I ever did see
    • Data::Dumper which I use all the time for debugging, as well as other stuff
    • Mail::Sendmail
    • LWP::Simple
    • Exporter - I confess I don't know totally what this does, but I use it whenever I write a module of my own, so I suppose it must be one of my favourites
    • Time::Local which I partly like because I think the name is quite witty (localtime converts from integer to date... so to go the other way...)
    • Font::AFM - I only ever used this once, but it gave me a real kick, as I can be quite obsessive about the mere appearance of words on the page, and this is a userful tool for perfecting the layout of generated (and hence unpredictable) text


    § George Sherston
Re: Favourite modules
by lestrrat (Deacon) on Mar 10, 2002 at 23:28 UTC

    In no particular order...

    • DBI - The sheer bliss when I converted our legacy flat-file base system to a *real* database.. ;)
    • XML::LibXML - I can't do XML without this...
    • Getopt::Long
    • LWP
    • Storable - so simple, so useful
    • SOAP::Lite - just started using this, but it's going to save me a lot of time :)
    • Date::Calc - cause I'm not smart enough to calculate dates
    • Exporter
    • IO - what would you do without it?
    • Data::Dumper - I use it all the time to debug
Re: Favourite modules
by lachoy (Parson) on Mar 10, 2002 at 23:44 UTC
Re: Favourite modules
by theguvnor (Chaplain) on Mar 11, 2002 at 01:51 UTC
    1. CGI
    2. CGI::Carp
    3. CGI::Application
    4. HTML::Parser
    5. DBI (and DBD::* friends)
    6. Data::Dumper
    7. XML::Simple
    8. LWP::UserAgent
    9. HTTP::Response
    10. GD

    Update: forgot one. This list goes to eleven a la Spinal Tap.

    11. MIME::Entities (how could I forget about you?)

    ..Guv

      1. CGI
      That's the only module I have needed to use in any of my programming expiriences... but then I don't have many of those expiriences either.

      work it harder make it better do it faster makes us stronger more than ever hour after our work is never over.
Re: Favourite modules
by mirod (Canon) on Mar 11, 2002 at 10:38 UTC

    OK, so here is my list:

    • CGI (including the HTML generation methods ;--),
    • Text::Template is my one-stop templating module,
    • Data::Denter, because I like the output better than Data::Dumper,
    • Inline::Files: way cool way to get code and data in a single file,
    • AnyData: get your data from CSV, log files, XML...
    • Roman, poster child of the small but ocasionnaly useful module, and why CPAN is such a wonderful place,

    XML modules:

    • XML::PYX for quickly extracting info from an XML document,
    • XML::Twig for all the rest (yes I am biased ;--)

    And of course:

      I agree wholeheartedly about Roman. It is indicative of the beauty of CPAN. And the perfect example of why to look there before leaping at any problem.
      In my roguelike game Tapestry, you can create characters from a template, they are named Fred, Fred II, Fred III, etc. I had written roman numeral translators in the past (I had once implemented LISP's format stuff into C and C++) and they are a big pain in the neck. So I look on CPAN and read,install,integrate... problem solved.

      -pete
      "I am Jack's utter lack of disbelief"

      * Text::Template is my one-stop templating module,
      * Inline::Files: way cool way to get code and data in a single file,

      You like templating, but also like having code and data in a single file? Could you please explain how those two go together? :)

      44696420796F7520732F2F2F65206F
      7220756E7061636B3F202F6D736720
      6D6521203A29202D2D204A75657264
      

        Oddly enough, I don't usually mix them. But actually I don't see any reason why you could not have the template as data in one of the inlined files.

Re: Favourite modules
by cjf (Parson) on Mar 11, 2002 at 08:43 UTC
Re: Favourite modules
by IlyaM (Parson) on Mar 11, 2002 at 18:53 UTC
Re: Favourite modules
by buckaduck (Chaplain) on Mar 11, 2002 at 13:25 UTC
    1. CGI (I write a lot of CGI programs.)
    2. DBI (And a lot of them are database frontends.)
    3. Data::Table (Create a HTML table from the results of a SQL query. Cool!)
    4. HTML::Table (Simplifies making tables to align my forms and such.)
    5. File::Find (Recursive filesystem traversal.)
    6. Date::Calc (My favorite of the Date modules.)
    7. Math::SigFigs (The ONLY module I know of to round-off numbers properly for scientists.)
    8. Getopt::Std (I'm too lazy to parse my own command line.)
    9. Tk (Graphical user interfaces made easy.)
    10. Spreadsheet::WriteExcel (My users still think they need Excel. So I humor them.)

    buckaduck

Re: Favourite modules
by Rex(Wrecks) (Curate) on Mar 11, 2002 at 19:59 UTC
    In the particular order that it rolled off my brain and out of my ear, down my sleeve to my fingers and onto the keyboard:
  • strict ...I'm with "the hell it don't count" comment :)
  • Net::Telnet
  • Net::SNMP
  • CGI
  • IO::Socket
  • IO::Select
  • IPC::Shareable
  • Win32::*
  • IO::Pty
  • Getopt::Std
  • Getopt::Long

    Module I would most like to magically appear:
  • Net::Ping_Real (Really, cross platform, ICMP ping that somehow would not require root prives on Unix! God it would make life easy :)

    Yeah I used 11, but the author said strict didn't count anyway :)

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!
Re: Favourite modules
by TStanley (Canon) on Mar 11, 2002 at 23:25 UTC
    In no particular order:
    1. strict
    2. warnings
    3. Games::QuizTaker - Ok, so I'm prejudiced :-)
    4. Net::Ping
    5. Text::xSV - tilly did a good job with this one
    6. Bone::Easy - for comedy purposes, this module is a riot
    7. Net::FTP
    8. Net::Telnet
    9. Tk
    10. File::Slurp

    Some people may not consider strict or warnings as modules, but these two usually end up saving me large amounts of grief while trying to figure out why my program isn't working like its supposed to.

    TStanley
    --------
    "Suppose you were an idiot... And suppose you were a
    member of Congress... But I repeat myself." -- Mark Twain

Re: Favourite modules
by zakzebrowski (Curate) on Mar 11, 2002 at 18:26 UTC
    No Order:
    • Net::IRC
    • Mail::Sendmail
    • GD::*
    • And of course: cgi
    • DBD, DBI::MySql, DBI::CSV


    ----
    Zak
Re: Favourite modules
by herveus (Prior) on Mar 12, 2002 at 15:38 UTC
    Howdy!

    My favorite modules?

    Set::Scalar
    CGI
    Sybase::CTlib
    Games::Cards
    Tk
    Data::Dumper
    IO::File
    Carp
    Getopt::Std

    ...that's nine... DBI is working itself into my list...

    yours,
    Michael

Re: Favourite modules
by oubiwann (Sexton) on Mar 12, 2002 at 16:28 UTC
    Wow, this is one perl of a collection of modules! You guys have great taste :-) But am I the only sysadmin here? I can't believe that to be true... Has no one else had cause to worship Net::SSH::Perl as much as I? Note, this is NOT the same as Net::SSH!!!

    After installing all the requisite modules (a task Marpa may have set for Milarepa on his quest for enlightenment), you have one sweet, functional, fast, and secure way of automating all those remote tasks via ssh.

    Check it out: Net::SSH::Perl

Re: Favourite modules
by Pug (Monk) on Mar 14, 2002 at 16:24 UTC
    I use perl for debugging the company's products and debugging my personal code.

    warnings => enough said.
    Data::Dumper => for debugging my code.
    LWP::UserAgent => for getting those web pages I have to brea.. errr QA.
    HTML::Form => get a list of inputs of a webpage delete /add/modify them. A great way to make the web developer/coder not want to see you. 8)
    URI::Escape => Mmm escaped characters made easy for fun and profit.
    HTTP::Cookies => cookies made easy and storeable.
    Net::Telnet => I used this for some networking research I did at NU.
    OpenCA::OpenSSL => This modual saved me a bunch of time and santiy. It drives OpenSSL and the developers have been keeping up the modual almost does everything that OpenSSL can do.

      I can not use OpenCA::OpenSSL. The constuctor returns me an empty objetc. Can you help me?
Re: Favourite modules
by Stegalex (Chaplain) on Mar 11, 2002 at 16:25 UTC
    Don't forget IO::Socket and Data::Dumper! I like chicken.
Re: Favourite modules
by dru145 (Friar) on Mar 11, 2002 at 15:44 UTC
    All of my favorite have already been stated (CGI, DBI), but mail::sender is definetly my favorite mailer module.

    Thanks,
    Dru
    Another satisfied monk.
Re: Favourite modules
by sifukurt (Hermit) on Mar 13, 2002 at 19:51 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://150727]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-19 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found