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

Changes for version 2.00 - 2012-11-19

  • Implement a new API, using the pure-Perl module Moos.
  • The use of Moos means methods which could previously be called as class methods or instance methods must now only be called as instance methods.
  • The use of Moos means new() now takes a hash, not a hashref. See scripts/*.pl.
  • Details of the new API:
    • HTML::Parser::Simple: New Old Mutators Getters and Setters
    • block() - current_node() get_current_node(), set_current_node() depth() get_depth(), set_depth() empty() - inline() - input_file() get_input_dir(), set_input_dir() node_type() get_node_type(), set_node_type() output_file() get_output_dir(), set_output_dir() root() get_root(), set_root() tagged_attribute() - verbose() get_verbose(), set_verbose() xhtml() get_xhtml(), set_xhtml()
    • HTML::Parser::Simple::Attributes: New Old Mutators Getters and Setters
    • a_hashref() - a_string() - get() get_attr() hashref2string() - parse() parse_attributes() string2hashref() -
  • HTML::Parser::Simple::Reporter is a new module. See scripts/parse.attributes.pl.
  • Change calls from Carp::croak to die. You should be using Try::Tiny anyway :-).
  • Change the fix in V 1.07 which output tags and attributes in lower-case. As of V 2.00, tags are in lower-case but the case of attributes is preserved.
  • Scripts shipped in scripts/: Name Module o parse.attributes.pl HTML::Parser::Simple::Reporter o parse.html.pl HTML::Parser::Simple o parse.xhtml.pl HTML::Parser::Simple
  • Sample data used by the scripts: Name Input Output o parse.attributes.pl data/s.1.html Screen o parse.html.pl data/s.1.html data/s.2.html o parse.xhtml.pl t/data/90.xml.declaration.xhtml data/90.xml.declaration.xml
  • Add t/parse.html.t, t/parse.xhtml.t, t/traverse.file.t.
  • Make many changes to the docs.

Modules

Parse nice HTML files without needing a compiler
A simple HTML attribute parser
A sub-class of HTML::Parser::Simple