.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.45)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "HTML::Lint::Error 3"
.TH HTML::Lint::Error 3 2023-07-20 "perl v5.38.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
HTML::Lint::Error \- Error object for the Lint functionality
.SH SYNOPSIS
.IX Header "SYNOPSIS"
See HTML::Lint for all the gory details.
.SH EXPORTS
.IX Header "EXPORTS"
None. It's all object-based.
.SH METHODS
.IX Header "METHODS"
Almost everything is an accessor.
.ie n .SH "Error types: ""STRUCTURE"", ""HELPER"", ""FLUFF"""
.el .SH "Error types: \f(CWSTRUCTURE\fP, \f(CWHELPER\fP, \f(CWFLUFF\fP"
.IX Header "Error types: STRUCTURE, HELPER, FLUFF"
Each error has a type. Note that these roughly, but not exactly, go
from most severe to least severe.
.IP \(bu 4
\&\f(CW\*(C`STRUCTURE\*(C'\fR
.Sp
For problems that relate to the structural validity of the code.
Examples: Unclosed
tags, incorrect values for attributes, and
repeated attributes.
.IP \(bu 4
\&\f(CW\*(C`HELPER\*(C'\fR
.Sp
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.
.IP \(bu 4
\&\f(CW\*(C`FLUFF\*(C'\fR
.Sp
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.
.SS \fBnew()\fP
.IX Subsection "new()"
Create an object. It's not very exciting.
.ie n .SS "is_type( $type1 [, $type2 ] )"
.el .SS "is_type( \f(CW$type1\fP [, \f(CW$type2\fP ] )"
.IX Subsection "is_type( $type1 [, $type2 ] )"
Tells if any of \fR\f(CI$type1\fR\fI\fR, \fI\fR\f(CI$type2\fR\fI\fR... match the error's type.
Returns the type that matched.
.PP
.Vb 1
\& if ( $err\->is_type( HTML::Lint::Error::STRUCTURE ) ) {....
.Ve
.SS \fBwhere()\fP
.IX Subsection "where()"
Returns a formatted string that describes where in the file the
error has occurred.
.PP
For example,
.PP
.Vb 1
\& (14:23)
.Ve
.PP
for line 14, column 23.
.PP
The terrible thing about this function is that it's both a plain
ol' formatting function as in
.PP
.Vb 1
\& my $str = where( 14, 23 );
.Ve
.PP
AND it's an object method, as in:
.PP
.Vb 1
\& my $str = $error\->where();
.Ve
.PP
I don't know what I was thinking when I set it up this way, but
it's bad practice.
.SS \fBas_string()\fP
.IX Subsection "as_string()"
Returns a nicely-formatted string for printing out to stdout or some similar user thing.
.SS \fBfile()\fP
.IX Subsection "file()"
Returns the filename of the error, as set by the caller.
.SS \fBline()\fP
.IX Subsection "line()"
Returns the line number of the error.
.SS \fBcolumn()\fP
.IX Subsection "column()"
Returns the column number, starting from 0
.SS \fBerrcode()\fP
.IX Subsection "errcode()"
Returns the HTML::Lint error code. Don't rely on this, because it will probably go away.
.SS \fBerrtext()\fP
.IX Subsection "errtext()"
Descriptive text of the error
.SS \fBtype()\fP
.IX Subsection "type()"
Type of the error
.SH "POSSIBLE ERRORS"
.IX Header "POSSIBLE ERRORS"
Each 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.
.SS api-parse-not-called
.IX Subsection "api-parse-not-called"
You called the \f(CWerrors()\fR method before calling \f(CWparse()\fR and \f(CWeof()\fR.
.SS api-eof-not-called
.IX Subsection "api-eof-not-called"
You called the \f(CWerrors()\fR method before calling \f(CWeof()\fR.
.SS config-unknown-directive
.IX Subsection "config-unknown-directive"
Unknown directive "DIRECTIVE"
.PP
You specified a directive in a comment for HTML::Lint that it didn't recognize.
.SS config-unknown-value
.IX Subsection "config-unknown-value"
Unknown value "VALUE" for DIRECTIVE directive
.PP
Directive values can only be "on", "off", "yes", "no", "true", "false", "0" and "1".
.SS elem-unknown
.IX Subsection "elem-unknown"
HTML::Lint doesn't know recognize the tag.
.SS elem-unopened
.IX Subsection "elem-unopened"
\&\f(CW\*(C`\*(C'\fR with no opening \f(CW\*(C`\*(C'\fR.
.SS elem-unclosed
.IX Subsection "elem-unclosed"
\&\f(CW\*(C`\*(C'\fR at WHERE is never closed.
.SS elem-empty-but-closed
.IX Subsection "elem-empty-but-closed"
\&\f(CW\*(C`\*(C'\fR is not a container \-\- \f(CW\*(C`\*(C'\fR is not allowed.
.SS elem-img-alt-missing
.IX Subsection "elem-img-alt-missing"
\&\f(CW\*(C`
\*(C'\fR does not have ALT text defined.
.SS elem-img-sizes-missing
.IX Subsection "elem-img-sizes-missing"
\&\f(CW\*(C`
\*(C'\fR tag has no HEIGHT and WIDTH attributes.
.SS elem-nonrepeatable
.IX Subsection "elem-nonrepeatable"
\&\f(CW\*(C`\*(C'\fR is not repeatable, but already appeared at WHERE.
.SS doc-tag-required
.IX Subsection "doc-tag-required"
\&\f(CW\*(C`\*(C'\fR tag is required.
.SS attr-repeated
.IX Subsection "attr-repeated"
ATTR attribute in \f(CW\*(C`\*(C'\fR is repeated.
.SS attr-unknown
.IX Subsection "attr-unknown"
Unknown attribute "ATTR" for tag \f(CW\*(C`\*(C'\fR.
.SS text-unclosed-entity
.IX Subsection "text-unclosed-entity"
Entity ENTITY is missing its closing semicolon
.SS text-unknown-entity
.IX Subsection "text-unknown-entity"
Entity ENTITY is unknown
.SS text-use-entity
.IX Subsection "text-use-entity"
Character "CHAR" should be written as ENTITY
.SH "COPYRIGHT & LICENSE"
.IX Header "COPYRIGHT & LICENSE"
Copyright 2005\-2018 Andy Lester.
.PP
This program is free software; you can redistribute it and/or modify it
under the terms of the Artistic License v2.0.
.PP
http://www.opensource.org/licenses/Artistic\-2.0
.PP
Please note that these modules are not products of or supported by the
employers of the various contributors to the code.
.SH AUTHOR
.IX Header "AUTHOR"
Andy Lester, \f(CW\*(C`andy at petdance.com\*(C'\fR