Text::...::HTML(3pm)
β¨ NAME β¨
Text::Markup::HTML β the HTML parser for Text::Markup π (you'll see it filed under Text::...::HTML(3pm) in the man pages, bestie, that's just how the shelf is labeled)
πΈ SYNOPSIS πΈ
use Text::Markup;
my $html = Text::Markup->new->parse(file => 'hello.html');
That's it. That's the whole vibe. Look at her go π¦
π DESCRIPTION π
okay so. This right here is the HTML parser for Text::Markup β and yes it's the one from <https://whatwg.org/html/>, the real deal, no knockoffs π―
And what does it do? Bestie. It reads in the HTML file and hands it right back to you as a string. That's the entire job. It is not doing extra. It is not doing less. It is simply being π§
Here's the part you gotta know though, fr fr: it makes no assumptions about encoding. Zero. None. It returns the string raw exactly as it was read from the file, with no decoding whatsoever. So if you were expecting it to peek at your charset and be like "let me fix that for you" β nope, it does not do that, it was never gonna do that, and honestly that's kind of iconic of it π
It recognizes files with these extensions as HTML:
.html.htm.xhtml.xhtm
Now β what if you wanna change which files it recognizes? Totally your call, main character. Just load this module directly and pass it a regular expression matching whatever extension(s) you want, like so:
use Text::Markup::HTML qr{hachetml};
Slay. Custom extensions, your rules, periodt β¨
π AUTHOR π
David E. Wheeler <david@justatheory.com> β thank him, he built this π
π COPYRIGHT AND LICENSE π
Copyright (c) 2011-2025 David E. Wheeler. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Go wild, just keep it legal, iykyk π«Ά
and that's the whole page bestie, no cap π
π written for perl v5.40.1, dated 2025-12-18, and yeah β that's the version and the date, go off π
π¦ where this page comes from
- ubuntu resolute: libtext-markup-perl 0.41-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-markup-perl 0.41-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms