Login
Consolidated the ProhibitExit policies into a single Policy.
[gknop/Perl-Critic.git] / t / BuiltinFunctions / ProhibitExitInSubroutines.run
... / ...
CommitLineData
1##############################################################################
2# $URL$
3# $Date$
4# $Author$
5# $Revision$
6##############################################################################
7
8## name basic pass, outside of subroutine
9## failures 0
10## cut
11
12
13exit;
14exit if $condition;
15$codition || exit();
16
17#-----------------------------------------------------------------------------
18
19## name basic failure, inside subroutine
20## failures 3
21## cut
22
23sub foo {
24 exit;
25 exit if $condition;
26 $codition || exit();
27}
28
29#-----------------------------------------------------------------------------
30
31## name not really exit() calls
32## failures 0
33## cut
34
35sub Foo {
36 $object->exit();
37 $hash{exit};
38}
39
40#-----------------------------------------------------------------------------
41
42##############################################################################
43# Local Variables:
44# mode: cperl
45# cperl-indent-level: 4
46# fill-column: 78
47# indent-tabs-mode: nil
48# c-indentation-style: bsd
49# End:
50# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :