1HTML::Tidy::Message(3)User Contributed Perl DocumentationHTML::Tidy::Message(3)
2
3
4

NAME

6       HTML::Tidy::Message - Message object for the Tidy functionality
7

SYNOPSIS

9       See HTML::Tidy for all the gory details.
10

EXPORTS

12       None.  It's all object-based.
13

METHODS

15       Almost everything is an accessor.
16
17   new( $file, $line, $column, $text )
18       Create an object.  It's not very exciting.
19
20   where()
21       Returns a formatted string that describes where in the file the error
22       has occurred.
23
24       For example,
25
26           (14:23)
27
28       for line 14, column 23.
29
30       The terrible thing about this function is that it's both a plain ol'
31       formatting function as in
32
33           my $str = where( 14, 23 );
34
35       AND it's an object method, as in:
36
37           my $str = $error->where();
38
39       I don't know what I was thinking when I set it up this way, but it's
40       bad practice.
41
42   as_string()
43       Returns a nicely-formatted string for printing out to stdout or some
44       similar user thing.
45
46   file()
47       Returns the filename of the error, as set by the caller.
48
49   type()
50       Returns the type of the error.  This will either be "TIDY_ERROR", or
51       "TIDY_WARNING".
52
53   line()
54       Returns the line number of the error, or 0 if there isn't an applicable
55       line number.
56
57   column()
58       Returns the column number, or 0 if there isn't an applicable column
59       number.
60
61   text()
62       Returns the text of the message.  This does not include a type string,
63       like "Info: ".
64
66       Copyright 2005-2017 Andy Lester.
67
68       This program is free software; you can redistribute it and/or modify it
69       under the terms of the Artistic License v2.0.
70

AUTHOR

72       Andy Lester, "<andy@petdance.com>"
73
74
75
76perl v5.30.1                      2020-01-30            HTML::Tidy::Message(3)
Impressum