Re: HTML::Parser line numbers

Randal Schwartz (merlyn@stonehenge.com)
22 Jan 1998 20:42:01 -0700


>>>>> "M" == M Hedlund <hedlund@best.com> writes:

M> On Thu, 22 Jan 1998, Brian Slesinsky wrote:
>> Hi, I created a subclass of HTML::Parser that keeps track of which
>> character and line it's at in the input file.  There's a lot of duplicate
>> code because I had to copy the parse() method and modify it.  Perhaps
>> you'd like to merge the changes back into HTML::Parser?  Line number info
>> might be useful for others (e.g. for printing error messages). 

M> Yeah, this would be a worthwhile feature-add.  Can you post the patch?

I did this already by subclassing.  See column #14 in
http://www.stonehenge.com/merlyn/WebTechniques/.  No need to hack
the original parse.

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me