RSS | Module Info | Add a review of Template-Extract

9 out of 9 found this review helpful:

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.

Mark Stosberg - 2006-03-03 11:34:20
Was this review helpful to you?  Yes No

2 out of 2 found this review helpful:

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: http://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.

Vincent D. Murphy - 2003-09-14 13:58:09
Was this review helpful to you?  Yes No

2 out of 2 found this review helpful:

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.

Adrian Howard - 2003-08-31 09:31:24
Was this review helpful to you?  Yes No

2 out of 2 found this review helpful:

Template-Extract (0.11) *****

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

Simon Cozens - 2003-08-31 05:34:15
Was this review helpful to you?  Yes No


the camel