Login
RT #79138: RequireArgUnpacking confused by @_ in finally{}
[gknop/Perl-Critic.git] / t / BuiltinFunctions / ProhibitVoidMap.run
CommitLineData
6977a06e
ES
1## name Basic passing
2## failures 0
3## cut
4
5$baz, map "$foo", @list;
6print map("$foo", @list);
7print ( map "$foo", @list );
8@list = ( map $foo, @list );
9$aref = [ map $foo, @list ];
10$href = { map $foo, @list };
11
12if( map { foo($_) } @list ) {}
13for( map { foo($_) } @list ) {}
14
15#-----------------------------------------------------------------------------
16
17## name Basic failure
18## failures 7
19## cut
20
21map "$foo", @list;
22map("$foo", @list);
23map { foo($_) } @list;
24map({ foo($_) } @list);
25
26if( $condition ){ map { foo($_) } @list }
27while( $condition ){ map { foo($_) } @list }
28for( @list ){ map { foo($_) } @list }
29
30#-----------------------------------------------------------------------------
31
32## name Chained void map
33## failures 1
34## cut
35
36map { foo($_) }
37 map { bar($_) }
38 map { baz($_) } @list;
39
40#-----------------------------------------------------------------------------
41
96c297de
CD
42## name not builtin map
43## failures 0
44## cut
45
46$self->map('Pennsylvania Ave, Washington, DC');
47
48#-----------------------------------------------------------------------------
49
6977a06e
ES
50##############################################################################
51# $URL$
52# $Date$
53# $Author$
54# $Revision$
55##############################################################################
56
57# Local Variables:
58# mode: cperl
59# cperl-indent-level: 4
60# fill-column: 78
61# indent-tabs-mode: nil
62# c-indentation-style: bsd
63# End:
96fed375 64# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :