|
NAMEHTML::Lint::Error - Error object for the Lint functionalitySYNOPSISSee HTML::Lint for all the gory details.EXPORTSNone. It's all object-based.METHODSAlmost everything is an accessor.Error types: "STRUCTURE", "HELPER", "FLUFF"Each error has a type. Note that these roughly, but not exactly, go from most severe to least severe.
new()Create an object. It's not very exciting.is_type( $type1 [, $type2 ] )Tells if any of $type1, $type2... match the error's type. Returns the type that matched.if ( $err->is_type( HTML::Lint::Error::STRUCTURE ) ) {.... where()Returns a formatted string that describes where in the file the error has occurred.For example, (14:23) for line 14, column 23. The terrible thing about this function is that it's both a plain ol' formatting function as in my $str = where( 14, 23 ); AND it's an object method, as in: my $str = $error->where(); I don't know what I was thinking when I set it up this way, but it's bad practice. as_string()Returns a nicely-formatted string for printing out to stdout or some similar user thing.file()Returns the filename of the error, as set by the caller.line()Returns the line number of the error.column()Returns the column number, starting from 0errcode()Returns the HTML::Lint error code. Don't rely on this, because it will probably go away.errtext()Descriptive text of the errortype()Type of the errorPOSSIBLE ERRORSEach possible error in HTML::Lint has a code. These codes are used to identify each error for when you need to turn off error checking for a specific error.api-parse-not-calledYou called the "errors()" method before calling "parse()" and "eof()".api-eof-not-calledYou called the "errors()" method before calling "eof()".config-unknown-directiveUnknown directive "DIRECTIVE"You specified a directive in a comment for HTML::Lint that it didn't recognize. config-unknown-valueUnknown value "VALUE" for DIRECTIVE directiveDirective values can only be "on", "off", "yes", "no", "true", "false", "0" and "1". elem-unknownHTML::Lint doesn't know recognize the tag.elem-unopened"</tag>" with no opening "<tag>".elem-unclosed"<tag>" at WHERE is never closed.elem-empty-but-closed"<tag>" is not a container -- "</tag>" is not allowed.elem-img-alt-missing"<img src="FILENAME.PNG">" does not have ALT text defined.elem-img-sizes-missing"<img src="FILENAME.PNG">" tag has no HEIGHT and WIDTH attributes.elem-nonrepeatable"<tag>" is not repeatable, but already appeared at WHERE.doc-tag-required"<tag>" tag is required.attr-repeatedATTR attribute in "<tag>" is repeated.attr-unknownUnknown attribute "ATTR" for tag "<tag>".text-unclosed-entityEntity ENTITY is missing its closing semicolontext-unknown-entityEntity ENTITY is unknowntext-use-entityCharacter "CHAR" should be written as ENTITYCOPYRIGHT & LICENSECopyright 2005-2018 Andy Lester.This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License v2.0. http://www.opensource.org/licenses/Artistic-2.0 Please note that these modules are not products of or supported by the employers of the various contributors to the code. AUTHORAndy Lester, "andy at petdance.com"
Visit the GSP FreeBSD Man Page Interface. |