Perl provides a simple mechanism for specifying subroutine argument types called prototypes. Prototypes do not affect functions defined using the &
character. Furthermore, the perlfunc manpage [Wall 2011] states:
Method calls are not influenced by prototypes either, because the function to be called is indeterminate at compile time, since the exact code called depends on inheritance.
...
Tool | Diagnostic |
---|---|
Perl::Critic | Subroutines::ProhibitSubroutinePrototypes |
Bibliography
[Conway 052005] | "Prototypes," p. 194 |
[CPAN] | Elliot Shank, Perl-Critic-1.116 Subroutines::ProhibitSubroutinePrototypes |
[Wall 2011] | perlsub |
...