.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 3pm" .TH HTML::Lint::Error 3pm "2020-12-28" "perl v5.32.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 <\s-1TABLE\s0> 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 \s-1HTML,\s0 or that will help the browser render the code better or faster. Example: Missing \s-1HEIGHT\s0 and \s-1WIDTH\s0 attributes in an \s-1IMG\s0 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 \fI\f(CI$type1\fI\fR, \fI\f(CI$type2\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 \&\s-1AND\s0 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(CW\*(C`errors()\*(C'\fR method before calling \f(CW\*(C`parse()\*(C'\fR and \f(CW\*(C`eof()\*(C'\fR. .SS "api-eof-not-called" .IX Subsection "api-eof-not-called" You called the \f(CW\*(C`errors()\*(C'\fR method before calling \f(CW\*(C`eof()\*(C'\fR. .SS "config-unknown-directive" .IX Subsection "config-unknown-directive" Unknown directive \*(L"\s-1DIRECTIVE\*(R"\s0 .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 \*(L"\s-1VALUE\*(R"\s0 for \s-1DIRECTIVE\s0 directive .PP Directive values can only be \*(L"on\*(R", \*(L"off\*(R", \*(L"yes\*(R", \*(L"no\*(R", \*(L"true\*(R", \*(L"false\*(R", \*(L"0\*(R" and \*(L"1\*(R". .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 \s-1WHERE\s0 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 \s-1ALT\s0 text defined. .SS "elem-img-sizes-missing" .IX Subsection "elem-img-sizes-missing" \&\f(CW\*(C`\*(C'\fR tag has no \s-1HEIGHT\s0 and \s-1WIDTH\s0 attributes. .SS "elem-nonrepeatable" .IX Subsection "elem-nonrepeatable" \&\f(CW\*(C`\*(C'\fR is not repeatable, but already appeared at \s-1WHERE.\s0 .SS "doc-tag-required" .IX Subsection "doc-tag-required" \&\f(CW\*(C`\*(C'\fR tag is required. .SS "attr-repeated" .IX Subsection "attr-repeated" \&\s-1ATTR\s0 attribute in \f(CW\*(C`\*(C'\fR is repeated. .SS "attr-unknown" .IX Subsection "attr-unknown" Unknown attribute \*(L"\s-1ATTR\*(R"\s0 for tag \f(CW\*(C`\*(C'\fR. .SS "text-unclosed-entity" .IX Subsection "text-unclosed-entity" Entity \s-1ENTITY\s0 is missing its closing semicolon .SS "text-unknown-entity" .IX Subsection "text-unknown-entity" Entity \s-1ENTITY\s0 is unknown .SS "text-use-entity" .IX Subsection "text-use-entity" Character \*(L"\s-1CHAR\*(R"\s0 should be written as \s-1ENTITY\s0 .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