Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / t / BuiltinFunctions / ProhibitComplexMappings.run
1 ## name Basic passing
2 ## failures 0
3 ## cut
4
5 map {$_} @list;
6 map {substr $_, 0, 10;} @list;
7 map {foo($_)} @list;
8 map {{$_ => 1}} @list;
9
10 map $_, @list;
11 map substr($_, 0, 10), @list;
12 map foo($_), @list;
13 map {$_ => 1}, @list;
14
15 $foo{map}; # for Devel::Cover
16 {map}; # for Devel::Cover
17 map();
18
19 #-----------------------------------------------------------------------------
20
21 ## name Basic failure
22 ## failures 2
23 ## cut
24
25 map {my $a = $foo{$_};$a} @list;
26 map {if ($_) { 1 } else { 2 }} @list;
27
28 #-----------------------------------------------------------------------------
29
30 ## name Compound statements (false negative)
31 ## failures 0
32 ## cut
33
34 map {do {$a; $b}} @list;
35 map do {$a; $b}, @list;
36
37 #-----------------------------------------------------------------------------
38
39 ## name Vary config parameters: success
40 ## failures 0
41 ## parms {max_statements => 2}
42 ## cut
43
44 map {my $a = $foo{$_};$a} @list;
45
46 #-----------------------------------------------------------------------------
47
48 ## name Vary config parameters: failue
49 ## failures 1
50 ## parms {max_statements => 2}
51 ## cut
52
53 map {my $a = $foo{$_};$a;$b} @list;
54
55 #-----------------------------------------------------------------------------
56
57 ##############################################################################
58 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/BuiltinFunctions/ProhibitComplexMappings.run $
59 #     $Date: 2008-03-16 17:40:45 -0500 (Sun, 16 Mar 2008) $
60 #   $Author: clonezone $
61 # $Revision: 2187 $
62 ##############################################################################
63
64 # Local Variables:
65 #   mode: cperl
66 #   cperl-indent-level: 4
67 #   fill-column: 78
68 #   indent-tabs-mode: nil
69 #   c-indentation-style: bsd
70 # End:
71 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :