Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

Perl::Critic::Community::Utils - Utility functions for the Community policy set

Author

       Dan Book, "dbook@cpan.org"

Description

       This module contains utility functions for use in Perl::Critic::Community policies. All functions are
       exportable on demand.

Functions

is_empty_return
        my $bool = is_empty_return($elem);

       Tests whether a PPI::Token::Word "return" element represents an empty "return" statement. This function
       returns false for return().

   is_structural_block
        my $bool = is_structural_block($elem);

       Tests whether a PPI::Structure::Block element is structural, and does not introduce a new calling
       context. This function currently only returns true for blocks in compound statements such as "if" and
       "foreach", but may be extended to cover more cases in the future.

Name

       Perl::Critic::Community::Utils - Utility functions for the Community policy set

See Also

       Perl::Critic, Perl::Critic::Community

perl v5.40.1                                       2025-03-22                Perl::Critic::Community::Utils(3pm)

See Also