The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HTML::Parser::Stacked - HTML::Parser With Stacked Handlers

SYNOPSIS

  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"
    ]
  );

DESCRIPTION

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.

METHODS

new

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 ... " ]
  );

AUTHOR

Copyright (c) 2007 Daisuke Maki <daisuke@endeworks.jp>

LICENSE

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