PPI::St...t::When(3)
π PPI::St...t::When(3) β bestie edition β¨
okay so this page lives in the User Contributed Perl Documentation corner of the manual, and it's literally called PPI::St...t::When(3) (yes the title is abbreviated like that, no I did not do it, that's just how it ships π«Ά). It's a Perl module page, it's giving very "one specific little job" energy, and honestly? We stan a specialist.
πΈ NAME πΈ
PPI::Statement::When β a when statement. that's it. that's the whole name. iconic, concise, no notes π
β¨ SYNOPSIS β¨
here's the vibe, bestie, straight up:
foreach ( qw/ foo bar baz / ) {
when ( m/b/ ) {
boing($_);
}
when ( m/f/ ) {
boom($_);
}
default {
tchak($_);
}
}
like... when, when, default, boom boom tchak π that's the whole demo.
π¦ INHERITANCE π¦
the family tree, and she is rooted:
PPI::Statement::When
isa PPI::Statement
isa PPI::Node
isa PPI::Element
so yeah, everything a PPI::Statement can do, she can do. everything a PPI::Node can do, she can do. everything a PPI::Element can do β you get it. heiress to the whole PPI empire, no cap π
π DESCRIPTION π
PPI::Statement::When objects are the little guys that describe when and default statements β you know, the ones laid out over in perlsyn. if you've ever written a when ( m/.../ ) block and gone "hmm what object is this in PPI," it's this one. she's the description of those statements, periodt. π
π§ METHODS π§
here's the tea, and it's short and sweet:
PPI::Structure::Whenhas no methods beyond those provided by the standardPPI::Structure,PPI::NodeandPPI::Elementmethods.
(yes, that line says PPI::Structure::When β capital-S Structure β that's exactly what the page says and we are quoting it character for character, don't shoot the messenger π)
so: no custom methods. she inherits everything, adds nothing. lowkey a minimalist queen π
π₯ TO DO π₯
the official list of things not done yet:
- Write unit tests for this package
that's the whole list. one (1) item. someone please, the tests are right there π
π«Ά SUPPORT π«Ά
See the support section in the main module.
(go check the main module bestie, that's where the help lives β)
π AUTHOR π
Adam Kennedy <adamk@cpan.org>
πΈ COPYRIGHT πΈ
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
and that's a wrap, babe π this was perl v5.42.0, dated 2026-01-17, and the page we just read was PPI::St...t::When(3). go forth and parse responsibly πβ¨π¦
π¦ where this page comes from
- fedora 44: perl-PPI 1.284-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms