HTML::HTML5::Parser::Error - an error that occured during parsing
Note that HTML::HTML5::Parser is not a validation tool, and there are many classes of error that it does not care about, so will not raise.
errors methods of
HTML::HTML5::Parser::Error overloads stringification, so can be printed, matched against regular expressions, etc.
new(level=>$level, type=>$type, token=>$token, ...)
Constructs a new
Returns the level of error. ('MUST', 'SHOULD', 'WARN', 'INFO' or undef.)
Returns the parsing layer involved, often undef. e.g. 'encode'.
Returns the type of error as a string.
Returns the tag name (if any).
($line, $col) = $error->source_line(); $line = $error->source_line;
In scalar context,
source_linereturns the line number of the source code that triggered the error.
In list context, returns a line/column pair. (Tab characters count as one column, not eight.)
Returns a friendly error string.
Toby Inkster, <firstname.lastname@example.org>
Copyright (C) 2011 by Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.