Template-Extract reviews

RSS | Module Info

Template-Extract (0.40) ***

This scraping tool is to nice to have in the toolbox, but's no substitute for a deeper understanding of Perl REs. Having been a convenient solution in the past, today Template::Extract fell flat on its face when I tried to use it. Even with the DEBUG option turned on, it just churned for a long time with no useful result.

Accomplishing the same task using regular pattern matching turned out to be simple to write:

my @custs;

while ($html =~ m{/custs.cgi\?id=(\d+)'.*?(PROSPECT|LEAD)-(.*?)\s*</td>}gs) {

push @custs, {

cust_id => $1,

stage => $2,

status => $3,



And it ran noticeably faster! Having compared both styles, sometimes the "old fashioned" way turns out to be simpler and clearer.

But yes, Template::Extract is certainly a neat idea and fun to play with.

Template-Extract (0.25) *****

Great idea, brilliantly executed. Given a template and a string, this module gives you the data out of the string. So you can write a parser for a string (a web page, say) by writing the template that *would* generate it.

NTK raved about this: www.ntk.net/2003/09/12/

See also Template::Generate by the same author, which given some data and a string, gives you the template that would generate the string.

Template-Extract (0.11) *****

Very nice tool for generating simple parsers / screen scrapers. You write a template toolkit template that would generate your content (using a subset of TT commands) and Template::Extract does the rest.

Most funky.

Template-Extract (0.11) *****

Was OurNet::Template, now Template::Extract. Easily my favourite module of the year. Makes parsing anything a doddle.