HTML::...ruction(3pm)
π NAME π
ok so bestie, gather round: this is HTML::TokeParser::Simple::Token::ProcessInstruction β the Token.pm process instruction class, and yes she's exactly as extra as her name sounds π
β¨ 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, copy that, run it, live your truth π
πΈ DESCRIPTION πΈ
okay so, Process Instructions? they come from XML, periodt. and honestly that's so handy if you need to parse out PHP and similar things with a parser β that's her whole moment π«Ά
ngl though, currently there appear to be some problems with process instructions π not gonna pretend otherwise. the good news? you can override this class if you need finer grained handling of process instructions β go off, customize her, make her yours β¨
also important: is_pi() and is_process_instruction() both return true. both of them. no notes π
π OVERRIDDEN METHODS π
these are the ones she took over, main character style:
get_token0is_piis_process_instructionreturn_token0
and that's the whole page bestie!! this absolute icon is shipped with perl v5.32.1, dated 2021-12-05, and it's part of the User Contributed Perl Documentation π©· mwah, go parse something cute ππ¦πΈ
π¦ 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