1HTML::HTML5::Parser::ErUrsoerr(3C)ontributed Perl DocumeHnTtMaLt:i:oHnTML5::Parser::Error(3)
2
3
4

NAME

6       HTML::HTML5::Parser::Error - an error that occurred during parsing
7

DESCRIPTION

9       The "error_handler" and "errors" methods of "HTML::HTML5::Parser"
10       generate "HTML::HTML5::Parser::Error" objects.
11
12       "HTML::HTML5::Parser::Error" overloads stringification, so can be
13       printed, matched against regular expressions, etc.
14
15       Note that HTML::HTML5::Parser is not a validation tool, and there are
16       many classes of error that it does not care about, so will not raise.
17
18   Constructor
19       "new(level=>$level, type=>$type, token=>$token, ...)"
20           Constructs a new "HTML::HTML5::Parser::Error" object.
21
22   Methods
23       "level"
24           Returns the level of error. ('MUST', 'SHOULD', 'WARN', 'INFO' or
25           undef.)
26
27       "layer"
28           Returns the parsing layer involved, often undef. e.g. 'encode'.
29
30       "type"
31           Returns the type of error as a string.
32
33       "tag_name"
34           Returns the tag name (if any).
35
36       "source_line"
37             ($line, $col) = $error->source_line();
38             $line = $error->source_line;
39
40           In scalar context, "source_line" returns the line number of the
41           source code that triggered the error.
42
43           In list context, returns a line/column pair. (Tab characters count
44           as one column, not eight.)
45
46       "to_string"
47           Returns a friendly error string.
48

SEE ALSO

50       HTML::HTML5::Parser.
51

AUTHOR

53       Toby Inkster, <tobyink@cpan.org>
54
56       Copyright (C) 2011-2012 by Toby Inkster
57
58       This library is free software; you can redistribute it and/or modify it
59       under the same terms as Perl itself.
60

DISCLAIMER OF WARRANTIES

62       THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
63       WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
64       MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
65
66
67
68perl v5.36.0                      2023-01-20     HTML::HTML5::Parser::Error(3)
Impressum