Perl::Critic::Policy::Freenode::Prototypes - Don't use function prototypes
Function prototypes are primarily a hint to the Perl parser for parsing the function's argument list. They are not a way to validate or count the arguments passed to the function, and will cause confusion if used this way. Often, the prototype can simply be left out, but see "Signatures" in perlsub for a more modern method of declaring arguments.
sub foo ($$) { ... } # not ok sub foo { ... } # ok use feature 'signatures'; sub foo ($bar, $baz) { ... } # ok
This policy is similar to the core policy Perl::Critic::Policy::Subroutines::ProhibitSubroutinePrototypes, but additionally ignores files using the signatures feature, and allows empty prototypes and prototypes containing &, as these are often useful for structural behavior.
signatures
&
This policy is part of Perl::Critic::Freenode.
This policy is not configurable except for the standard options.
Dan Book, dbook@cpan.org
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.
Perl::Critic
To install Perl::Critic::Freenode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Freenode
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Freenode
For more information on module installation, please visit the detailed CPAN module installation guide.