Perl::...:Utils(3pm)
π Perl::Critic::Community::Utils β the manual page, bestie edition π
okay so real talk: this is the manpage for Perl::Critic::Community::Utils(3pm), a lil helper module from the User Contributed Perl Documentation corner of the universe. it's not the main character, it's the best friend module that holds the main character's bag. and honestly? iconic behaviour. π«Ά
β¨ NAME β¨
Perl::Critic::Community::Utils β utility functions for the Community policy set π
πΈ DESCRIPTION πΈ
so this module is literally just a lil grab-bag of utility functions made to be used inside Perl::Critic::Community policies. that's it. that's the whole vibe. β¨
and the slay part? all functions are exportable on demand. no cap. you ask, it delivers. π
π§ FUNCTIONS π§
π is_empty_return
my $bool = is_empty_return($elem);
okay so what this does: it tests whether a PPI::Token::Word "return" element is actually representing an empty "return" statement. like, is this return returning nothing? vibe check complete. π
β οΈ heads up bestie: this function returns false for return(). so don't come for it, it's very specific about that. π
π¦ is_structural_block
my $bool = is_structural_block($elem);
this one tests whether a PPI::Structure::Block element is structural, meaning it does not introduce a new calling context. it's giving "just here for structure, not for drama." π
π rn this function currently only returns true for blocks inside compound statements such as"if"and"foreach"β but it may be extended to cover more cases in the future. so like, watch this space. π
π AUTHOR π
Dan Book, dbook@cpan.org π
π COPYRIGHT AND LICENSE π
Copyright 2015, Dan Book.
This library is free software; you may redistribute it and/or modify it under the terms of the Artistic License version 2.0. yes, fr fr, go forth and remix. π«Ά
π SEE ALSO π
Perl::CriticPerl::Critic::Community
and that's the whole page bestie!! π this little legend shipped as part of perl v5.40.1, dated 2025-03-22 β so if anyone asks, that's the lore, the timestamp, the whole origin story. mwah. πβ¨π
π¦ where this page comes from
- debian trixie: libperl-critic-community-perl 1.0.4-1 Β· Artistic-2.0
- ubuntu resolute: libperl-critic-community-perl 1.0.4-1 Β· Artistic-2.0
- ubuntu stonking: libperl-critic-community-perl 1.0.4-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms