Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / t / CodeLayout / RequireTrailingCommas.run
1 ## name Basic passing
2 ## failures 0
3 ## cut
4
5 ($foo,
6  $bar,
7  $baz
8 );
9 @list = ($foo, $bar, $baz);
10 @list = some_function($foo, $bar, $baz);
11 @list = ($baz);
12 @list = ();
13
14 @list = (
15 );
16
17 @list = ($baz
18 );
19
20 @list = ($baz
21         );
22
23 # not a straight assignment
24 @list = ((1,2,3),(
25  1,
26  2,
27  3
28 ));
29
30 #-----------------------------------------------------------------------------
31
32 ## name Basic failure
33 ## failures 3
34 ## cut
35
36 @list = ($foo, 
37          $bar, 
38          $baz);
39
40 @list = ($foo, 
41          $bar, 
42          $baz
43         );
44
45 @list = ($foo, 
46          $bar, 
47          $baz
48 );
49
50 #-----------------------------------------------------------------------------
51
52 ## name List assignment
53 ## failures 0
54 ## cut
55
56 @list = ($foo, 
57          $bar, 
58          $baz,);
59
60 @list = ($foo, 
61          $bar, 
62          $baz,
63 );
64
65 @list = ($foo, 
66          $bar, 
67          $baz,
68         );
69
70 #-----------------------------------------------------------------------------
71
72 ## name Conditionals and mathematical precedence
73 ## failures 0
74 ## cut
75
76 $foo = ( 1 > 2 ?
77          $baz  :
78          $nuts );
79
80 $bar = ( $condition1
81          && (    $condition2
82               || $condition3 )
83        );
84
85
86 # These were reported as false-positives.
87 # See http://rt.cpan.org/Ticket/Display.html?id=18297
88
89 $median = ( $times[ int $array_size / 2 ] +
90             $times[(int $array_size / 2) - 1 ]) / 2;
91
92 $median = ( $times[ int $array_size / 2 ] +
93             $times[ int $array_size / 2  - 1 ]) / 2;
94
95 #-----------------------------------------------------------------------------
96
97 ## name code coverage
98 ## failures 1
99 ## cut
100
101 @list = ($foo,
102          $bar,
103          $baz --
104          );
105
106 #-----------------------------------------------------------------------------
107
108 ##############################################################################
109 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/CodeLayout/RequireTrailingCommas.run $
110 #     $Date: 2008-03-16 17:40:45 -0500 (Sun, 16 Mar 2008) $
111 #   $Author: clonezone $
112 # $Revision: 2187 $
113 ##############################################################################
114
115 # Local Variables:
116 #   mode: cperl
117 #   cperl-indent-level: 4
118 #   fill-column: 78
119 #   indent-tabs-mode: nil
120 #   c-indentation-style: bsd
121 # End:
122 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :