Rechercher une page de manuel
HTML::Lint::Error.3pm
Langue: en
Version: 2008-12-08 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
HTML::Lint::Error - Error object for the Lint functionalitySYNOPSIS
See HTML::Lint for all the gory details.EXPORTS
None. It's all object-based.METHODS
Almost 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.- *
- "STRUCTURE"
For problems that relate to the structural validity of the code. Examples: Unclosed <TABLE> tags, incorrect values for attributes, and repeated attributes.
- *
- "HELPER"
Helpers are notes that will help you with your HTML, or that will help the browser render the code better or faster. Example: Missing HEIGHT and WIDTH attributes in an IMG tag.
- *
- "FLUFF"
Fluff is for items that don't hurt your page, but don't help it either. This is usually something like an unknown attribute on a tag.
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 errorTODO
None, other than incorporating more errors, as driven by HTML::Lint.LICENSE
This code may be distributed under the same terms as Perl itself.Please note that these modules are not products of or supported by the employers of the various contributors to the code.
AUTHOR
Andy Lester, "andy at petdance.com"Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre