Grinnz / Perl-Critic-Community

Perl::Critic::Community - Community-inspired Perl::Critic policies
https://metacpan.org/pod/Perl::Critic::Community
Other
8 stars 10 forks source link

How does Freenode::Prototypes differ from core Subroutines::ProhibitSubroutinePrototypes? #12

Closed petdance closed 9 years ago

petdance commented 9 years ago

Similar to #11, I don't see any indication of when I should use Freenode::Prototypes instead of Subroutines::ProhibitSubroutinePrototypes.

http://search.cpan.org/~dbook/Perl-Critic-Freenode/lib/Perl/Critic/Policy/Freenode/Prototypes.pm

vs.

http://search.cpan.org/~thaljef/Perl-Critic-1.125/lib/Perl/Critic/Policy/Subroutines/ProhibitSubroutinePrototypes.pm

Grinnz commented 9 years ago

In this case, the Freenode policy is more permissive; the core policy prohibits all prototypes, while the Freenode policy allows them if they are empty, if they contain &, or if the signatures feature is enabled.

petdance commented 9 years ago

That distinction would be excellent to have in the docs.

Grinnz commented 9 years ago

Clarified in commit b6bdee2