1Perl::Critic::Policy::SUPuseberrrlo:uC:toCinrntiertsii:bc:u:Pt:rePodohliPibecirytl:N:eDSsoutcbeurdmoSeuuntbtisan(te3is)o:n:ProhibitNestedSubs(3)
2
3
4

NAME

6       Perl::Critic::Policy::Subroutines::ProhibitNestedSubs - "sub never {
7       sub correct {} }".
8

AFFILIATION

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

DESCRIPTION

13       Attention would-be clever Perl writers (including Younger RJBS):
14
15       This does not do what you think:
16
17         sub do_something {
18             ...
19             sub do_subprocess {
20                 ...
21             }
22             ...
23         }
24
25       "do_subprocess()" is global, despite where it is declared.  Either
26       write your subs without nesting or use anonymous code references.
27

CONFIGURATION

29       This Policy is not configurable except for the standard options.
30

NOTE

32       Originally part of Perl::Critic::Tics.
33

AUTHOR

35       Ricardo SIGNES <rjbs@cpan.org>
36
38       Copyright (c) 2007-2011 Ricardo SIGNES.
39
40       This program is free software; you can redistribute it and/or modify it
41       under the same terms as Perl itself.
42
43
44
45perl v5.30.1          Perl::Critic2:0:2P0o-l0i1c-y3:0:Subroutines::ProhibitNestedSubs(3)
Impressum