a request
I'd also like a get_hashtoken method, wich would return a hashref token, that'd look someting like:
so then I could do$VAR1 = { 'type' => 'S', # or T|E|C|D|PI 'tag' => 'html', 'attr' => {}, 'attrseq' => [], 'text' => '<HTML>', };
still no array indices to remember, and less methods ;)my $token = $parser->get_hashtoken(); if($token->{type} eq 'S') { if(exists $token->{attrs}->{href}) { print Data::Dumper::DumperX($token); } }
Also, please get rid of the autoload magic, you're not Lincoln Stein (it is unneccessary, you don't have that many methods like CGI.pm, and it slows things down, please .. if your arms are cramping up, i'll volunteer to do the typing).
update: on the AUTOLOAD issue, I too want to ask "Anyone else think that the AUTOLOAD should go?"
| ______crazyinsomniac_____________________________ Of all the things I've lost, I miss my mind the most. perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;" |
In reply to (crazyinsomniac : a request) Re: RFC: HTML::TokeParser::Easy
by crazyinsomniac
in thread RFC: HTML::TokeParser::Easy
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |