NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
HTML::TokeParser::Simple (Score:2)
Never having been a fan of HTML::TokeParser's arrayrefs, I wrote HTML::TokeParser::Simple [cpan.org]. It provides the accessor methods I wanted and makes the code much easier to read. Want to know if a token is a starting or ending form tag? With HTML::TokeParser, you do this:
if( ('S' eq $token->[0] or 'E' eq $token->[0]) and 'form' eq $token->[1] ) {
Now, you can do this:
if ( $token->is_tag( 'form' ) ) {
Heck, you can leave the 'form' off to get a boolean response on whether or not something is a tag. There are many useful methods, it makes HTML parsing an almost trivial affair, and I have no idea if anyone is using the darn thing. That's a somewhat deflating aspect of being a CPAN author. Aside from the occasional bug report, who knows if you've helped anyone? I've had some thoughts of other things I'd like to do with that module, but I don't want to spend a lot of time one something that no one will ever use.
Reply to This