Subject: | _is_keeper assumes its argument is a HTML::Tidy::Message |
Distribution: source code
Perl version: N/A
OS vender/version: N/A
In this snippet from HTML::Tidy::parse
...
} else {
warn "Unknown error type: $line";
++$parse_errors;
}
push( @{$self->{messages}}, $message ) if $self->_is_keeper( $message
...
If an unrecognized line triggers the parse error case, then the undefined $message variable is passed to _is_keeper. _is_keeper assumes that it's getting a HTML::Tidy::Message object, which it's not. Thus when it trys to call Message::text or Message::type an undefined method error is thrown.
A simple fix is to just verify that _is_keeper's argument is a HTML::Tidy::Message.