HTML::Parser::Stacked - HTML::Parser With Stacked Handlers
use HTML::Parser::Stacked; HTML::Parser::Stacked->new( start_h => [ [ \&start_handler1, \&start_handler2, \&start_handler3 ], "self,tag,attr" ], text_h => [ [ \&text_handler1, \&text_handler2, \&text_handler3 ], "self,dtext" ] );
I often find myself using multiple modules to analyze the contents of an HTML document. By using this module, you can make one pass at the document while employing multiple logics.
Takes the same arguments as HTML::Parser, except that the handler spec is an array reference of code references
If you had previously
HTML::Parser->new( start_h => [ \&foo, " ... spec ... " ] );
You should write it as
HTML::Parser::Stacked->new( start_h => [ [\&foo], " ... spec ... " ] );
Copyright (c) 2007 Daisuke Maki <daisuke@endeworks.jp>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install HTML::Parser::Stacked, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Parser::Stacked
CPAN shell
perl -MCPAN -e shell install HTML::Parser::Stacked
For more information on module installation, please visit the detailed CPAN module installation guide.