in reply to Re: Re: Re: Re: Re: HTML::Parser - no contents. no error.
in thread HTML::Parser - no contents. no error.

HTML::Parser is not to blame. You have logic errors.

First #$parser->report_tags( qw( @report_tags ) ); should be #$parser->report_tags( @report_tags );.

Second, your text_handler is flawed. You test     if ( $self->{_stack}->[0] ) { # filters out text outside a tag. which will FAIL every time since '<@report_tags>' and/or '</@report_tags>' are never encountered. The same would happen if you only had text as input. I suggest you rework your text_handler, and in the future always start with a small example which demonstrates the problem (it's easier to diagnose the actual problem that way).

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: HTML::Parser - no contents. no error.
by Anonymous Monk on Oct 30, 2003 at 16:57 UTC

    That qw slipped in there during one of my experiments. While pointless it produces the same outcome -- an array of HTML tags the parser should call. I removed that.

    I also removed that initial if-then from the text handler since I really didn't need it any longer.

    HTML::Parser still fails to call any of the handlers with these changes when report_tags is set. This code without the suggested changes above does work properly on other systems, but with versions other then 3.25.