Risk-Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

Perl::Critic::Policy::Subroutines::ProhibitAmpersandSigils - Don't call functions with a leading

Affiliation

       This Policy is part of the core Perl::Critic distribution.

Author

       Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>

Configuration

       This Policy is not configurable except for the standard options.

Description

       Since Perl 5, the ampersand sigil is completely optional when invoking subroutines.  It also turns off
       checking of subroutine prototypes.  It's easily confused with the bitwise 'and' operator.

         @result = &some_function(); # not ok
         @result = some_function();  # ok

Name

       Perl::Critic::Policy::Subroutines::ProhibitAmpersandSigils - Don't call functions with a leading
       ampersand sigil.

See Also