PPI::St...cheduled(3)
β¨ PPI::Statement::Scheduled β¨
okay bestie, gather round, we're talking about PPI::Statement::Scheduled β a scheduled code block, fr fr. it's a Perl module, it lives in the PPI:: family, and it is exactly what it says on the tin π
𧬠INHERITANCE π§¬
the family tree is giving very much royal lineage π so here it is, verbatim, don't @ me:
PPI::Statement::Scheduled
isa PPI::Statement::Sub
isa PPI::Statement
isa PPI::Node
isa PPI::Element
so yeah, she's a PPI::Statement::Sub, which is a PPI::Statement, which is a PPI::Node, which is a PPI::Element. four generations of iconic behavior, no cap π
π DESCRIPTION π
a scheduled code block is one that is intended to be run at a specific time during the loading process. like, it's got a schedule. it's booked. it's got plans that night and it WILL be attending ποΈβ¨
there are five types of scheduled block, and yes we're listing all five because the way that i would simply never leave one out:
BEGIN {
# Executes as soon as this block is fully defined
...
}
CHECK {
# Executes after overall compile-phase in reverse order
...
}
UNITCHECK {
# Executes after compile-phase of individual module in reverse order
...
}
INIT {
# Executes just before run-time
...
}
END {
# Executes as late as possible in reverse order
...
}
look at them. five little icons π BEGIN, CHECK, UNITCHECK, INIT, END. each one with its own moment in the timeline. the commitment to scheduling is honestly aspirational.
technically β and this is the plot twist π«’ β these scheduled blocks are actually subroutines, and in fact may have 'sub' in front of them. so like, sub BEGIN { } is a whole vibe that exists in the wild.
π οΈ METHODS π οΈ
π type
the "type" method returns the type of scheduled block, which should always be one of 'BEGIN', 'CHECK', 'UNITCHECK', 'INIT' or 'END'.
that's it. that's the method. it tells you which one you're looking at. lowkey the most honest method in the whole codebase π«Ά
π TO DO π
- Write unit tests for this package
yeah. that's the whole to-do list. one item. the honesty?? the vulnerability?? i'm obsessed π someone get this package its unit tests please, it deserves them π
π SUPPORT π
See the support section in the main module.
(i'm not making it up, that's literally where the support lives β go check the main module bestie, iykyk π)
π AUTHOR π
Adam Kennedy <adamk@cpan.org>
absolute main character energy, thank you for your service π«‘β¨
Β©οΈ 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.
so like, it's free, it's Perl-licensed, it's all above board. read the LICENSE file if you want the whole lore π
and that's the whole page, bestie!! this doc is perl v5.42.0, dated 2026-01-17, straight out of the User Contributed Perl Documentation collection β go forth and schedule your blocks responsibly, mwah ππΈ
π¦ 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