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 <firstname.lastname@example.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.