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


Perl-Critic documentation  | view source Contained in the Perl-Critic distribution.

Index


NAME

Top

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

AFFILIATION

Top

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

DESCRIPTION

Top

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




CONFIGURATION

Top

This Policy is not configurable except for the standard options.

AUTHOR

Top

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

COPYRIGHT

Top


Perl-Critic documentation  | view source Contained in the Perl-Critic distribution.