HTML::...n::Text(3pm)

πŸ“¦
version 3.16 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– HTML::TokeParser::Simple::Token::Text πŸ’–

okay bestie, so this is the perl documentation page for HTML::TokeParser::Simple::Token::Text (it lives in the 3pm section, iykyk) 🫢


✨ NAME ✨

HTML::TokeParser::Simple::Token::Text β€” it's the Token.pm text class, no cap πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

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, that comment in there is doing the Lord's work fr fr β€” this little loop prints all the text in an HTML doc, aka it strips the HTML right off πŸ’…


🌸 DESCRIPTION 🌸

So this class represents "text" tokens. that's it, that's the vibe ✨

if you want the actual details, go read the "HTML::TokeParser::Simple" documentation, bestie β€” it's all there πŸ‘‘


πŸ‘‘ OVERRIDDEN METHODS πŸ‘‘

these are the methods that got a glow-up in this class πŸ’–

  • as_is β€” overridden, she's doing her own thing now ✨
  • is_text β€” also overridden, iconic behaviour honestly πŸŽ€

and that's the whole page!! short, sweet, slays πŸ’…

ngl this one is smol but that's fine, sometimes the main character just doesn't need a whole essay πŸ¦‹

perl v5.32.1 Β· 2021-12-05 Β· HTML::...n::Text(3pm) β€” mwah, that's a wrap, ily bye πŸ’œ

πŸ“¦ where this page comes from