HTML::...Message(3pm)

πŸ’– NAME πŸ’–

okay so bestie, meet HTML::Tidy::Message β€” it's the Message object for the Tidy functionality. that's it, that's the whole job. it holds a message. it's giving little messenger bag energy πŸŽ€

(this is the HTML::...Message(3pm) page, from the User Contributed Perl Documentation, hi bestie welcome to the group chat 🫢)


✨ SYNOPSIS ✨

ngl the synopsis is literally just a hand-off:

See HTML::Tidy for all the gory details.

so if you want the actual lore, the messy, bloody, behind-the-scenes stuff? that's HTML::Tidy's problem, not ours. go ask them πŸ’…


πŸŽ€ EXPORTS πŸŽ€

None. zero. nada. not one single thing.

it's all object-based around here β€” no sneaky functions yeeting themselves into your namespace, no cap. you gotta make objects like a grown-up. πŸ‘‘


🌸 METHODS 🌸

almost everything in here is just an accessor β€” a cute lil getter that hands you back a thing. lowkey humble, highkey useful.


πŸ¦‹ new( $file, $line, $column, $text )

creates an object, bestie. that's the whole vibe.

it's not very exciting. genuinely. i'm not being shady, the docs said it first. 🫠


⭐ where()

returns a formatted string that describes where in the file the error has occurred. like a lil "you are here" map but for broken HTML.

for example,

(14:23)

which means line 14, column 23. iconic format, honestly. πŸ—ΊοΈ

now here's the messy part β€” and i need you to sit down for this one β€” this function is BOTH a plain ol' formatting function, like:

my $str = where( 14, 23 );

AND it's an object method, like:

my $str = $error->where();

yeah. same name. two jobs. the author literally says: "I don't know what I was thinking when I set it up this way, but it's bad practice."

πŸ’€ so: it works, it's documented, it's real β€” but it's bad practice, that's a known thing, not me being dramatic. i am dramatic but i'm also right.

🌈 as_string()

returns a nicely-formatted string for printing out to stdout or some similar user thing. it's the "show the human" version. ready to print, no extra assembly required ✨


πŸ“ file()

returns the filename of the error, as set by the caller. so whatever you told it, it'll hand back. it does not go investigate. it is not a detective. πŸ”


πŸ’œ type()

returns the type of the error. this will be either:

  • "TIDY_ERROR"
  • "TIDY_WARNING"

two options, that's the whole menu. pick your fighter. βš”οΈ


🧚 line()

returns the line number of the error β€” or 0 if there isn't an applicable line number. so a 0 means "no line info bestie, don't read into it". πŸ™ˆ


πŸŽ€ column()

returns the column number β€” or 0 if there isn't an applicable column number. same deal as line(). 0 = we don't know, moving on. πŸ’…


πŸ”₯ text()

returns the text of the message. and important: this does not include a type string, like "Info: ". so it's the bare message, no prefix, no garnish, no little label sticker. just the words. πŸ‘‘


Copyright 2005-2017 Andy Lester.

This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License v2.0. 🌈✨


🌸 AUTHOR 🌸

Andy Lester, "<andy@petdance.com>" β€” the icon who built this lil message object 🫢


and that's the whole page bestie!! this one shipped as perl v5.42.3, dated 2026-08-19, under the name HTML::...Message(3pm) β€” so go forth, read your Tidy messages, and remember: where() does two jobs and we all just live with it πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from