Perl::...:Utils(3pm)

πŸ“¦
version 1.0.4 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 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::Critic
  • Perl::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