Build all packages removed dependencies of libtest-exception-perl libtest-warn-perl...
[dh-make-perl] / dev / i386 / libperl-critic-perl / libperl-critic-perl-1.088 / t / Subroutines / ProhibitExcessComplexity.run
1 ## name parm-based pass
2 ## failures 0
3 ## parms { max_mccabe => 100 }
4 ## cut
5 sub test_sub {
6     if ( $foo && $bar || $baz ) {
7         open my $fh, '<', $file or die $!;
8     }
9     elsif ( $blah >>= some_function() ) {
10         return if $barf;
11     }
12     else {
13         $results = $condition ? 1 : 0;
14     }
15     croak unless $result;
16
17     while( $condition ){ frobulate() }
18     until( $foo > $baz ){ blech() }
19 }
20
21 #-----------------------------------------------------------------------------
22
23 ## name parm-based failure
24 ## failures 1
25 ## parms { max_mccabe => 1 }
26 ## cut
27 sub test_sub {
28     if ( $foo && $bar || $baz ) {
29         open my $fh, '<', $file or die $!;
30     }
31     elsif ( $blah >>= some_function() ) {
32         return if $barf;
33     }
34     else {
35         $results = $condition ? 1 : 0;
36     }
37     croak unless $result;
38 }
39
40 #-----------------------------------------------------------------------------
41
42 ## name no-op sub
43 ## failures 0
44 ## cut
45 sub test_sub {
46 }