1Perl::Critic::Policy::SUusbePrreoruClto:in:ntCerrsii:bt:uiPtcre:od:hPiPobeliritlcMyaD:no:ycSAuurmbgersno(tu3at)tiinoens::ProhibitManyArgs(3)
2
3
4
6 Perl::Critic::Policy::Subroutines::ProhibitManyArgs - Too many
7 arguments.
8
10 This Policy is part of the core Perl::Critic distribution.
11
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
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
26 To ignore $self or $class in your argument count, as long as they're
27 the first argument, use:
28
29 [Subroutines::ProhibitManyArgs]
30 skip_object = 1
31
33 PPI doesn't currently detect anonymous subroutines, so we don't check
34 those. This should just work when PPI gains that feature.
35
36 We don't check for @ARG, the alias for @_ from English.pm. That's
37 deprecated anyway.
38
40 Initial development of this policy was supported by a grant from the
41 Perl Foundation.
42
44 Chris Dolan <cdolan@cpan.org>
45
47 Copyright (c) 2007-2019 Chris Dolan. Many rights reserved.
48
49 This program is free software; you can redistribute it and/or modify it
50 under the same terms as Perl itself. The full text of this license can
51 be found in the LICENSE file included with this module
52
53
54
55perl v5.32.1 Perl::Crit2i0c2:1:-P0o3l-i2c4y::Subroutines::ProhibitManyArgs(3)