Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Sunday June 01, 2003
11:01 PM

HTML::TokeParser::Simple 2.0 *not* on the CPAN

[ #12552 ]

I tried to release HTML::TokeParser::Simple 2.0 today, but I can't connect to PAUSE. Even pinging it gets nothing. For the time being, you can download it from this link.

It got bumped up a version number due to it being a fairly extensive revision. From the Changes file:

2.0   Sun Jun 1, 2003
      is_tag, is_start_tag, and is_end_tag now can take regexes.
      Added set_attr and delete_attr methods to rewrite tags on the fly
      Converted to Test::More and doubled the number of tests
      Updated POD
      Updated Makefile.PL to list Test::More as a requirement
      Deprecated 'return_text' now carps

I'm particularly happy with the attribute munging methods. People repeatedly parse HTML to alter the attributes. Now you can do that on the fly:

# <p foo="bar">
$token->delete_attr('foo');
$token->set_attr('class', 'some_class');
# <p class="some_class">

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I'm particularly happy with the attribute munging methods. People repeatedly parse HTML to alter the attributes. Now you can do that on the fly.

    Yay!

    • Glad you like it. People kept trying to change attributes, I kept posting examples of how to do it and I even had one in the POD. It was time to move it into the module itself. I think it's probably the single most useful feature I've put in there.