VOOZH about

URL: https://manpages.org/htmlhtml5parsererror/3

⇱ man HTML::HTML5::Parser::Error (3): an error that occurred during parsing


HTML::HTML5::Parser::Error(3) an error that occurred during parsing

DESCRIPTION

The and methods of generate objects.

overloads stringification, so can be printed, matched against regular expressions, etc.

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.

Constructor

"new(level=>$level, type=>$type, token=>$token, ...)"
Constructs a new object.

Methods

"level"
Returns the level of error. ('', '', '', '' or undef.)
"layer"
Returns the parsing layer involved, often undef. e.g. 'encode'.
"type"
Returns the type of error as a string.
"tag_name"
Returns the tag name (if any).
"source_line"
 ($line, $col) = $error->source_line();
 $line = $error->source_line;

In scalar context, returns 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.)

"to_string"
Returns a friendly error string.

AUTHOR

Toby Inkster, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2011-2012 by Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

DISCLAIMER OF WARRANTIES

`` '' , , , A .