in reply to RFC: HTML::TokeParser::Easy

Ovid, glad to see that you're moving ahead with this module. Does it overcome the objection about the get_tag() method from HTML::TokeParser not working properly in the previous version?

..Guv

Replies are listed 'Best First'.
(Ovid) Re(2): RFC: HTML::TokeParser::Easy
by Ovid (Cardinal) on Mar 02, 2002 at 07:09 UTC

    It does get around that problem, but it was tricky to pull off. The get_tag() method returned a token in the same format as a start or end tag token from the get_token() method, minus the first array element. I wound up "faking" the method call by unshifting on the appropriate array element, if the token was generated by get_tag(), and then shifting it back off at the end of the method call. It was ugly, but it solved problems that other strategies created (such as not breaking inheritance).

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.