Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

On the crossroads

by yacoob (Acolyte)
on Oct 22, 2003 at 21:36 UTC ( [id://301384]=perlmeditation: print w/replies, xml ) Need Help??

Greetings, Earth^WMonks.

Imagine a guy who knows basics of Perl. Well, at least he thinks so (and he has some spagetthi code to prove it :). He sits down and says: "Lets write a program to do foo". He doesn't want to revolutionize the world with it, or conquer the market, or start some new community of devoted users - he just want to check his Perl skills in practice, in bigger project. And so...

... is there already a program that does foo? Well? Hm, maybe not. Or maybe there is, but our hero is pretty stuborn and still insists on writting one for himself. And so, the crosroads.... MODULES. There is no need to write basic things, lets use existing CPAN modules, tested by others. But *which*?

My question is this: can you please make a list of 'must-know' modules, or handy modules. These, that you can say 'How can you write foo program without Foo::Barbize module?'. And I mean both obvious ones (like DBI for DB access :) and less popular/known ones. Tell me what do you use in your everyday programming, and why this module is worth looking at. Tell me if you have any favourite perl-army knife :)

I know I can just plunge into CPAN, read documentation to every module there, and after that (assuming I'm still sane :) judge for myself which module should I use. I know also, that without specyfing exact area of programming (i.e. HTML parsing) this question can have tons of answer. But anyway, it was curiosity that killed the cat...

Replies are listed 'Best First'.
Re: On the crossroads
by TVSET (Chaplain) on Oct 22, 2003 at 22:03 UTC
    Well, without any specifics of your task you are basically asking for statistics on CPAN module usage. :) I'd say that, considering the fact that most Perl programs deal with web and databases (at least throughout my experience), you will not waste your time if you'll brush through CGI and DBI. But that you already knew most probably. :) So, you might try something that works with dates, like Date::Calc or Date::Manip. Maybe, some database abstraction modules might do some good - check out Class::DBI and DBIx::Abstract. That is as far as I can go without specifics. :)
Re: On the crossroads
by jacques (Priest) on Oct 22, 2003 at 22:16 UTC
    See the Phalanx project's top 100.

    http://qa.perl.org/phalanx/

    I know I can just plunge into CPAN, read documentation to every module there.

    Only if you are a robot.

Re: On the crossroads
by Abigail-II (Bishop) on Oct 22, 2003 at 22:13 UTC
    Unless you tell us what you want to do, this is a bit of a silly question. There will be tons of people who use CGI and all kinds of other modules, because all, or a larger portion of their Perl coding involves the web. Other, like me, avoid web coding like the plague, and will not use any of those modules.

    Most of my programs won't use any CPAN modules at all. It's not that I code the functionality myself, but the programs are short enough that it's not needed. If I look at which standard modules I use most often, the following spring out: strict, warnings, constant, lib, Exporter, Fcntl, POSIX, and GetOpt::Long.

    Abigail

Re: On the crossroads
by TomDLux (Vicar) on Oct 22, 2003 at 22:16 UTC

    Start with the modules in the core distribution. There's a reason they are distributed to everyone.

    If you are new to Perl, you should be reading tutorials and articles wherever you can find them, most of all master monks such as Merlyn, MJD, Damian, Simon Cozens, ... What modules do they use in their articles?

    --
    TTTATCGGTCGTTATATAGATGTTTGCA

Re: On the crossroads
by greenFox (Vicar) on Oct 23, 2003 at 04:04 UTC
Re: On the crossroads
by Zaxo (Archbishop) on Oct 23, 2003 at 02:12 UTC

    Graph and PDL are each incredibly useful at times.

    After Compline,
    Zaxo

      As the (obviously biased) maintainer of both, I agree. To spell out the uses for each:
      • Graph: for an object capturing "things", and "connections between things", with some well-known algorithms such as shortest-path, connected components
      • PDL: for array-programming, high-performance maths including matrix maths including physics, image processing, 3D graphics, and similar data-crunching things (and anything handling binary data, really)
      By the way, spoiler alert: quite a lot of graph-theory stuff can (and should) be modelled with matrix-maths stuff.
Re: On the crossroads
by jdtoronto (Prior) on Oct 23, 2003 at 01:17 UTC
    Aprt from the ones above:
    • CGI::Session if you are doing CGI work.
    • Text::CSV_XS if you handle ,csv or txt files of data
    • SQL::Abstract is not always PC around here but it is very useful in the right place
    As others have said, be a little more specific about what foo is and we will be more forthcoming about our favourites.

    But that selection along with the ones TVSET mentioned would be my "Swiss Army Chain Saw" of Perl modules.

    jdtoronto

Re: On the crossroads
by valdez (Monsignor) on Oct 23, 2003 at 10:21 UTC
Re: On the crossroads
by Aragorn (Curate) on Oct 23, 2003 at 07:26 UTC
    There are modules for an insanely wide variety of tasks, so specific pointers are a bit hard to give. Like it was said before, start with the modules in the core distribution.

    Reading the documentation about all the modules on CPAN is indeed a big task, but the division in categories and subcategories is a very useful feature. Browse the docs on a module you think is appropriate for the problem at hand, see what (if any) rating it has. Search PerlMonks for opinions that people have about that specific module. And, very important, use the module in some small script, just to test it out. Reading the docs is important, but getting a feel for its usefulness comes from actually using it.

    Arjen

Re: On the crossroads
by bakunin (Scribe) on Oct 23, 2003 at 13:20 UTC
    I don't think this is a silly question, but I aggree that it could have been focused to a certain subject. Please Google or search.cpan the names :)))

    1. POE for multitasking
    2. PerlQT for nice GUIs
    3. ming-perl for Dynamic SWF generation (my subject) or the SWF
    module from CPAN, don't used it.
    4. Class::MethodMaker /Class::MakeMethods from CPAN for OOP
    5. as monks pointed out, definely Class::DBI
    6. dig through perl.com articles
    7. definetely look what the standard distribution brings to our homes. (Someting I have to do myself!)

    I haven't used some of these modules, for my projects I've been growing this list in my mind for some time. So many modules to learn!!
Re: On the crossroads
by Anonymous Monk on Oct 27, 2003 at 03:22 UTC
    This is out of date. It is not a complete list of interesting packages. It is designed to pull in other packages.
    Archive.pm package Bundle::Archive; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Archive =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Archive'> =head1 CONTENTS Compress::LZF Compress::LZV1 Compress::Zlib Convert::ASN1 Convert::BER Archive::Tar =head1 DESCRIPTION =head1 AUTHOR Pat Monardo Data.pm package Bundle::Data; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Data =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Data'> =head1 CONTENTS Bit::ShiftReg Bit::Vector Set::Bag Set::Range Set::IntRange Set::IntSpan Set::NestedGroups Set::Object Set::Scalar Set::Window Data::Dumper Data::MultiValuedHash Data::ShowTable Data::Walker Storable =head1 DESCRIPTION =head1 AUTHOR Pat Monardo Database.pm package Bundle::Database; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Database =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Database'> =head1 CONTENTS GDBM_File DB_File BerkeleyDB DBI DBD::mysql MLDBM =head1 DESCRIPTION =head1 AUTHOR Pat Monardo Date.pm package Bundle::Date; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Date =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Date'> =head1 CONTENTS Date::Calc Date::Convert Date::Format Date::GetDate Date::ISO Date::Language Date::Manip Date::Ordinal Date::Parse Date::Pcalc Time::CTime Time::DaysInMonth Time::HiRes Time::Period Time::Timezone Time::Zone =head1 DESCRIPTION =head1 AUTHOR Pat Monardo Devel.pm package Bundle::Devel; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Devel =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Devel'> =head1 CONTENTS Env::Array Devel::Symdump Params::Validate =head1 DESCRIPTION =head1 AUTHOR Pat Monardo File.pm package Bundle::File; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::File =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::File'> =head1 CONTENTS File::MMagic File::Spec File::PathConvert File::FlockDir File::Remote File::Cat File::Sort =head1 DESCRIPTION =head1 AUTHOR Pat Monardo IO.pm package Bundle::IO; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::IO =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::IO'> =head1 CONTENTS IO::String IO::Stringy IO::SendFile IO::Cat IO::LockedFile IO::Tee IO::Multiplex IO::Pipe IO::Interface IO::Sockatmark IO::Socket::UNIX IO::Socket::Multicast IO::Zlib IO::Default IO::Null =head1 DESCRIPTION =head1 AUTHOR Pat Monardo Image.pm package Bundle::Image; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Image =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Image'> =head1 CONTENTS GD GD::Text GD::Graph Image::Size =head1 DESCRIPTION =head1 AUTHOR Pat Monardo Mail.pm package Bundle::Mail; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Mail =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Mail'> =head1 CONTENTS Mail::Alias Mail::Audit Mail::Util Mail::Sendmail =head1 DESCRIPTION =head1 AUTHOR Pat Monardo Net.pm package Bundle::Net; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Net =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Net'> =head1 CONTENTS Net::SSLeay IO::Socket::SSL Net::LDAP =head1 DESCRIPTION =head1 AUTHOR Pat Monardo Security.pm package Bundle::Security; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Security =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Security'> =head1 CONTENTS Digest::MD5 Digest::MD2 Digest::SHA1 Digest::HMAC Digest::HMAC_MD5 Digest::HMAC_SHA1 Digest MD5 =head1 DESCRIPTION =head1 AUTHOR Pat Monardo String.pm package Bundle::String; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::String =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::String'> =head1 CONTENTS Parse::Yapp Font::AFM =head1 DESCRIPTION =head1 AUTHOR Pat Monardo UI.pm package Bundle::UI; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::UI =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::UI'> =head1 CONTENTS Term::Info Term::ReadKey Term::ReadLine::Perl Term::Size =head1 DESCRIPTION =head1 AUTHOR Pat Monardo Web.pm package Bundle::Web; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::Web =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::Web'> =head1 CONTENTS MIME::Base64 MIME::Lite URI HTML::Parser HTML::Tagset HTML::Tree LWP Apache::DB Apache::DBI =head1 DESCRIPTION =head1 AUTHOR Pat Monardo XML.pm package Bundle::XML; $VERSION = '0.1'; 1; __END__ =head1 NAME Bundle::XML =head1 SYNOPSIS C<perl -MCPAN -e 'install Bundle::XML'> =head1 CONTENTS XML::Parser XML::Parser::PerlSAX XML::Encoding XML::DOM XML::XQL XML::RSS #XML::Sablotron XML::Dumper =head1 DESCRIPTION =head1 AUTHOR Pat Monardo

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found