HTML::...omment(3pm)
π¬ NAME π¬
okay bestie, gather round β this is HTML::TokeParser::Simple::Token::Comment, aka the Token.pm comment class. she's the little glow-up wrapper that handles comment tokens and she's literally so iconic for it π
β¨ SYNOPSIS β¨
here's the vibe, copy-paste it and go π
use HTML::TokeParser::Simple;
my $p = HTML::TokeParser::Simple->new( $somefile );
while ( my $token = $p->get_token ) {
# This prints all text in an HTML doc (i.e., it strips the HTML)
next unless $token->is_text;
print $token->as_is;
}
likeβ¦ look at that loop. she's looping. she's filtering. she's printing. main character energy fr fr π¦
πΈ DESCRIPTION πΈ
so basically? this is the class for comment tokens. that's her whole job. comments. she ate and left no crumbs π
and if you wanna go deep-deep on what comments actually are under the hood, go read HTML::Parser β it has the detailed info about comments, no cap πβ¨
π OVERRIDDEN METHODS π
π is_comment
is_comment() will return true if the token is the DTD at the top of the HTML. yes bestie, that's what the doc says and we're reporting it faithfully, iykyk π
not me double-checking that this method lives under OVERRIDDEN METHODS β she does, she's a little overachiever π
π that's the whole page π
lowkey short, highkey perfect. this page came from perl v5.32.1, dated 2021-12-05, and it's filed under HTML::...omment(3pm) in the User Contributed Perl Documentation. mwah, take care of her π«Άπβ
π¦ where this page comes from
- debian bookworm: libhtml-tokeparser-simple-perl 3.16-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libhtml-tokeparser-simple-perl 3.16-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libhtml-tokeparser-simple-perl 3.16-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-tokeparser-simple-perl 3.16-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhtml-tokeparser-simple-perl 3.16-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libhtml-tokeparser-simple-perl 3.16-4 Β· 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