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


HTML-Parser-Stacked documentation  | view source Contained in the HTML-Parser-Stacked distribution.

Index


NAME

Top

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

SYNOPSIS

Top

  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

Top

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

Top

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

Top

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

LICENSE

Top

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


HTML-Parser-Stacked documentation  | view source Contained in the HTML-Parser-Stacked distribution.