HTML::HTML5::Parser::Error(3pm) | User Contributed Perl Documentation | HTML::HTML5::Parser::Error(3pm) |
HTML::HTML5::Parser::Error - an error that occurred during parsing
The "error_handler" and "errors" methods of "HTML::HTML5::Parser" generate "HTML::HTML5::Parser::Error" objects.
"HTML::HTML5::Parser::Error" 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.
($line, $col) = $error->source_line(); $line = $error->source_line;
In scalar context, "source_line" 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.)
HTML::HTML5::Parser.
Toby Inkster, <tobyink@cpan.org>
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.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2022-08-28 | perl v5.34.0 |