6 map {substr $_, 0, 10;} @list;
11 map substr($_, 0, 10), @list;
15 $foo{map}; # for Devel::Cover
16 {map}; # for Devel::Cover
19 #-----------------------------------------------------------------------------
25 map {my $a = $foo{$_};$a} @list;
26 map {if ($_) { 1 } else { 2 }} @list;
28 #-----------------------------------------------------------------------------
30 ## name Compound statements (false negative)
34 map {do {$a; $b}} @list;
35 map do {$a; $b}, @list;
37 #-----------------------------------------------------------------------------
39 ## name Vary config parameters: success
41 ## parms {max_statements => 2}
44 map {my $a = $foo{$_};$a} @list;
46 #-----------------------------------------------------------------------------
48 ## name Vary config parameters: failue
50 ## parms {max_statements => 2}
53 map {my $a = $foo{$_};$a;$b} @list;
55 #-----------------------------------------------------------------------------
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 $
62 ##############################################################################
66 # cperl-indent-level: 4
68 # indent-tabs-mode: nil
69 # c-indentation-style: bsd
71 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :