There's probably a Perl module that does that.

   Print.Print
Email.Email weblog link
Blog this.Blog this
brian d foy

brian d foy
Jul. 14, 2005 06:57 PM
Permalink

Atom feed for this author. RSS 1.0 feed for this author. RSS 2.0 feed for this author.

As I was 37,000 feet in the air flying across the country, I need a Perl module to extract information from a cooked template. If I was going to create that module myself, I'd call it Template::Extract.

The Comprehensive Perl Archive Network (CPAN) has so many modules that most things probably already exist. I figure out what I would call the module (and, since I'm a PAUSE admin, that's often what they are called ;), then try to install it. I just assume it exists.


prompt$ cpan Template::Extract


The CPAN.pm module finds Template::Extract in my minicpan on my laptop (so I can install modules while on an airplane) and starts to install it, and it's exactly what I want.

This happens quite a bit, actually, and I still think this is one of the reasons that Perl is popular. I'd be really nervous about Ruby and Python if they had the same thing (and I think they will, eventually).

brian d foy is a Perl trainer for Stonehenge Consulting Services and is the publisher of The Perl Review.