1Perl::Critic::Policy::SUusbePrreoruClto:in:ntCerrsii:bt:uiPtcre:od:hPiPobeliritlcMyaD:no:ycSAuurmbgersno(tu3at)tiinoens::ProhibitManyArgs(3)
2
3
4

NAME

6       Perl::Critic::Policy::Subroutines::ProhibitManyArgs - Too many
7       arguments.
8

AFFILIATION

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

DESCRIPTION

13       Subroutines that expect large numbers of arguments are hard to use
14       because programmers routinely have to look at documentation to remember
15       the order of those arguments.  Many arguments is often a sign that a
16       subroutine should be refactored or that an object should be passed to
17       the routine.
18

CONFIGURATION

20       By default, this policy allows up to 5 arguments without warning.  To
21       change this threshold, put entries in a .perlcriticrc file like this:
22
23         [Subroutines::ProhibitManyArgs]
24         max_arguments = 6
25

CAVEATS

27       PPI doesn't currently detect anonymous subroutines, so we don't check
28       those.  This should just work when PPI gains that feature.
29
30       We don't check for @ARG, the alias for @_ from English.pm.  That's
31       deprecated anyway.
32

TO DO

34       Don't include $self and $class in the count.
35

CREDITS

37       Initial development of this policy was supported by a grant from the
38       Perl Foundation.
39

AUTHOR

41       Chris Dolan <cdolan@cpan.org>
42
44       Copyright (c) 2007-2011 Chris Dolan.  Many rights reserved.
45
46       This program is free software; you can redistribute it and/or modify it
47       under the same terms as Perl itself.  The full text of this license can
48       be found in the LICENSE file included with this module
49
50
51
52perl v5.16.3            Perl::Crit2i0c1:4:-P0o6l-i0c9y::Subroutines::ProhibitManyArgs(3)
Impressum