(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:
- Data::Dumper (102)
- CGI (81)
- DBI (52)
- IO::File (31)
- Getopt::Std (24)
- CGI::Carp (24)
- LWP::Simple (22)
- HTTP::Request::Common (20)
- LWP (17)
- 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];
| [reply] [d/l] |
|
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_:]+);/;
}
| [reply] [d/l] |
|
scanned all .pl and .cgi files to see which modules i use the most
Heh, I get something totally different if I do that:
The first two are unsurprising :)
/J\
| [reply] |
|
| [reply] |
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
| [reply] |
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)
| [reply] |
Re: Favourite modules
by derby (Abbot) on Mar 10, 2002 at 19:21 UTC
|
Not in any particular order
-derby | [reply] |
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" | [reply] |
Re: Favourite modules
by BazB (Priest) on Mar 10, 2002 at 19:41 UTC
|
| [reply] |
Re: Favourite modules
by jryan (Vicar) on Mar 10, 2002 at 21:45 UTC
|
| [reply] |
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}
| [reply] |
|
| [reply] |
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" | [reply] |
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:
- Data::Dumper - So useful in debugging, I've set
my PERL5DB environment variable to be,
"BEGIN { use Data::Dumper; require 'perl5db.pl'; }".
- SOAP::Lite - Using it more and more each day
- HTTP::Daemon - I've lost count of how many applications I've written that use this for their network layer
- Perl/GTK+ bindings - if only the code were as stable as Perl/Tk
- mod_perl - I'm always learning some new trick I can do with this one
- B::Terse - the opcode tree has proven indispensible when debugging core-dumps inside XS code
- XML::SAX - starting to use this more and more
- Devel::Peek - another indispensible tool for the XS programmer
- AutoLoader - dynamic loading for Perl code is good, especially when your (legacy) library has 30+ functions
- 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
| [reply] |
Re: Favourite modules
by gellyfish (Monsignor) on Mar 10, 2002 at 22:11 UTC
|
| [reply] |
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 | [reply] [d/l] [select] |
Re: Favourite modules
by lestrrat (Deacon) on Mar 10, 2002 at 23:28 UTC
|
| [reply] |
Re: Favourite modules
by lachoy (Parson) on Mar 10, 2002 at 23:44 UTC
|
"Favorite" is a little difficult. How about ten (or so) of the ones I cannot live without -- not including my own :-)
And how about a few I'd like to learn but don't have the time or the project to devote to them?
Chris
M-x auto-bs-mode
| [reply] |
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:
| [reply] |
|
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"
| [reply] |
|
* 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
| [reply] |
|
| [reply] |
Re: Favourite modules
by theguvnor (Chaplain) on Mar 11, 2002 at 01:51 UTC
|
- CGI
- CGI::Carp
- CGI::Application
- HTML::Parser
- DBI (and DBD::* friends)
- Data::Dumper
- XML::Simple
- LWP::UserAgent
- HTTP::Response
- GD
Update: forgot one. This list goes to eleven a la Spinal Tap.
11. MIME::Entities (how could I forget about you?)
..Guv
| [reply] |
|
- 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.
| [reply] |
Re: Favourite modules
by cjf (Parson) on Mar 11, 2002 at 08:43 UTC
|
Most of mine have already been mentioned, but here's the remainder of them:
| [reply] |
Re: Favourite modules
by IlyaM (Parson) on Mar 11, 2002 at 18:53 UTC
|
| [reply] |
|
| [reply] |
Re: Favourite modules
by buckaduck (Chaplain) on Mar 11, 2002 at 13:25 UTC
|
- CGI (I write a lot of CGI programs.)
- DBI (And a lot of them are database frontends.)
- Data::Table (Create a HTML table from the results of a SQL query. Cool!)
- HTML::Table (Simplifies making tables to align my forms and such.)
- File::Find (Recursive filesystem traversal.)
- Date::Calc (My favorite of the Date modules.)
- Math::SigFigs (The ONLY module I know of to round-off numbers properly for scientists.)
- Getopt::Std (I'm too lazy to parse my own command line.)
- Tk (Graphical user interfaces made easy.)
- Spreadsheet::WriteExcel (My users still think they need Excel. So I humor them.)
buckaduck
| [reply] |
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! | [reply] |
Re: Favourite modules
by TStanley (Canon) on Mar 11, 2002 at 23:25 UTC
|
In no particular order:
- strict
- warnings
- Games::QuizTaker - Ok, so I'm prejudiced :-)
- Net::Ping
- Text::xSV - tilly did a good job with this one
- Bone::Easy - for comedy purposes, this module is a riot
- Net::FTP
- Net::Telnet
- Tk
- 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
| [reply] |
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 | [reply] |
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
| [reply] |
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 | [reply] |
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. | [reply] |
|
I can not use OpenCA::OpenSSL. The constuctor returns me an empty objetc.
Can you help me?
| [reply] |
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. | [reply] |
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.
| [reply] |
Re: Favourite modules
by sifukurt (Hermit) on Mar 13, 2002 at 19:51 UTC
|
Lots of good choices so far. I've got a few more to add to the list, in no particular order. These are the modules that I install/upgrade immediately when I'm on a new system.
___________________
Kurt
| [reply] |