Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / t / TestingAndDebugging / RequireUseWarnings.run
1 ## name 1 statement before warnings
2 ## failures 1
3 ## cut
4
5 $foo = $bar;
6 use warnings;
7
8 #-----------------------------------------------------------------------------
9
10 ## name several statements before warnings
11 ## failures 1
12 ## cut
13
14 $foo = $bar;   ## This one violates.
15 $baz = $nuts;  ## no critic;  This one is exempted
16 $blamo;        ## This one should be squelched
17 use warnings;
18
19 #-----------------------------------------------------------------------------
20
21 ## name several statements before warnings with maximum violations changed
22 ## failures 2
23 ## parms { maximum_violations_per_document => 2 }
24 ## cut
25
26 $foo = $bar;   ## This one violates.
27 $baz = $nuts;  ## This one violates.
28 $blamo;        ## This one should be squelched
29 use warnings;
30
31 #-----------------------------------------------------------------------------
32
33 ## name no warnings at all
34 ## failures 1
35 ## cut
36
37 $foo = $bar;
38
39 #-----------------------------------------------------------------------------
40
41 ## name no warnings at all with "use 5.005"
42 ## failures 0
43 ## cut
44
45 $foo = $bar;
46 use 5.005;
47
48 #-----------------------------------------------------------------------------
49
50 ## name no warnings at all with "use 5.006"
51 ## failures 1
52 ## cut
53
54 $foo = $bar;
55 use 5.006;
56
57 #-----------------------------------------------------------------------------
58
59 ## name require warnings
60 ## failures 1
61 ## cut
62
63 require warnings;
64 1;
65
66 #-----------------------------------------------------------------------------
67
68 ## name warnings used, but no code
69 ## failures 0
70 ## cut
71
72 use warnings;
73
74 #-----------------------------------------------------------------------------
75
76 ## name -w used, but no code
77 ## failures 0
78 ## cut
79
80 #!perl -w
81
82 #-----------------------------------------------------------------------------
83
84 ## name -W used, but no code
85 ## failures 0
86 ## cut
87
88 #!perl -W
89
90 #-----------------------------------------------------------------------------
91
92 ## name no warnings at all, w/END
93 ## failures 1
94 ## cut
95
96 $foo = $bar;
97
98 #Should not find the rest of these
99
100 __END__
101
102 =head1 NAME
103
104 Foo - A Foo factory class
105
106 =cut
107
108 #-----------------------------------------------------------------------------
109
110 ## name no warnings at all, w/DATA
111 ## failures 1
112 ## cut
113
114 $foo = $bar;
115
116 #Should not find the rest of these
117
118 __DATA__
119
120 Fred
121 Barney
122 Wilma
123
124
125 #-----------------------------------------------------------------------------
126
127 ## name warnings used
128 ## failures 0
129 ## cut
130
131 use warnings;
132 $foo = $bar;
133
134 #-----------------------------------------------------------------------------
135
136 ## name Other module included before warnings
137 ## failures 0
138 ## cut
139
140 use Module;
141 use warnings;
142 $foo = $bar;
143
144 #-----------------------------------------------------------------------------
145
146 ## name package statement before warnings
147 ## failures 0
148 ## cut
149
150 package FOO;
151 use warnings;
152 $foo = $bar;
153
154 #-----------------------------------------------------------------------------
155
156 ## name Work around a PPI bug that doesn't return a location for C<({})>.
157 ## failures 1
158 ## cut
159
160 ({})
161
162 #-----------------------------------------------------------------------------
163
164 ## name Moose support
165 ## failures 0
166 ## cut
167
168 use Moose;
169 $foo = $bar;
170
171 #-----------------------------------------------------------------------------
172
173 ## name Moose::Role support
174 ## failures 0
175 ## cut
176
177 use Moose::Role;
178 $foo = $bar;
179
180 #-----------------------------------------------------------------------------
181
182 ##############################################################################
183 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/TestingAndDebugging/RequireUseWarnings.run $
184 #     $Date: 2008-06-18 16:19:46 -0500 (Wed, 18 Jun 2008) $
185 #   $Author: clonezone $
186 # $Revision: 2459 $
187 ##############################################################################
188
189 # Local Variables:
190 #   mode: cperl
191 #   cperl-indent-level: 4
192 #   fill-column: 78
193 #   indent-tabs-mode: nil
194 #   c-indentation-style: bsd
195 # End:
196 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :