Once more unto resync
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / 3both
CommitLineData
599cee73 1Check interaction of $^W and lexical
2
3__END__
4
4438c4b7 5# Check interaction of $^W and use warnings
599cee73 6sub fred {
4438c4b7 7 use warnings ;
599cee73 8 my $b ;
9 chop $b ;
10}
11{ local $^W = 0 ;
12 fred() ;
13}
14
15EXPECT
146174a9 16Use of uninitialized value in scalar chop at - line 6.
599cee73 17########
18
4438c4b7 19# Check interaction of $^W and use warnings
599cee73 20sub fred {
4438c4b7 21 use warnings ;
0453d815 22 my $b ;
23 chop $b ;
24}
25{ $^W = 0 ;
26 fred() ;
27}
28
29EXPECT
146174a9 30Use of uninitialized value in scalar chop at - line 6.
0453d815 31########
32
4438c4b7 33# Check interaction of $^W and use warnings
0453d815 34sub fred {
4438c4b7 35 no warnings ;
599cee73 36 my $b ;
37 chop $b ;
38}
39{ local $^W = 1 ;
40 fred() ;
41}
42
43EXPECT
0453d815 44
45########
46
4438c4b7 47# Check interaction of $^W and use warnings
0453d815 48sub fred {
4438c4b7 49 no warnings ;
0453d815 50 my $b ;
51 chop $b ;
52}
53{ $^W = 1 ;
54 fred() ;
55}
56
57EXPECT
58
599cee73 59########
60
4438c4b7 61# Check interaction of $^W and use warnings
62use warnings ;
599cee73 63$^W = 1 ;
64my $b ;
65chop $b ;
66EXPECT
146174a9 67Use of uninitialized value in scalar chop at - line 6.
599cee73 68########
69
4438c4b7 70# Check interaction of $^W and use warnings
599cee73 71$^W = 1 ;
4438c4b7 72use warnings ;
599cee73 73my $b ;
74chop $b ;
75EXPECT
146174a9 76Use of uninitialized value in scalar chop at - line 6.
599cee73 77########
78
4438c4b7 79# Check interaction of $^W and use warnings
599cee73 80$^W = 1 ;
4438c4b7 81no warnings ;
599cee73 82my $b ;
83chop $b ;
84EXPECT
0453d815 85
599cee73 86########
87
4438c4b7 88# Check interaction of $^W and use warnings
89no warnings ;
599cee73 90$^W = 1 ;
91my $b ;
92chop $b ;
93EXPECT
0453d815 94
95########
96-w
4438c4b7 97# Check interaction of $^W and use warnings
98no warnings ;
0453d815 99my $b ;
100chop $b ;
101EXPECT
102
103########
104-w
4438c4b7 105# Check interaction of $^W and use warnings
106use warnings ;
0453d815 107my $b ;
108chop $b ;
109EXPECT
146174a9 110Use of uninitialized value in scalar chop at - line 5.
0453d815 111########
112
4438c4b7 113# Check interaction of $^W and use warnings
0453d815 114sub fred {
4438c4b7 115 use warnings ;
0453d815 116 my $b ;
117 chop $b ;
118}
119BEGIN { $^W = 0 }
120fred() ;
121EXPECT
146174a9 122Use of uninitialized value in scalar chop at - line 6.
0453d815 123########
124
4438c4b7 125# Check interaction of $^W and use warnings
0453d815 126sub fred {
4438c4b7 127 no warnings ;
0453d815 128 my $b ;
129 chop $b ;
130}
131BEGIN { $^W = 1 }
132fred() ;
133
134EXPECT
135
136########
137
4438c4b7 138# Check interaction of $^W and use warnings
139use warnings ;
0453d815 140BEGIN { $^W = 1 }
141my $b ;
142chop $b ;
143EXPECT
146174a9 144Use of uninitialized value in scalar chop at - line 6.
0453d815 145########
146
4438c4b7 147# Check interaction of $^W and use warnings
0453d815 148BEGIN { $^W = 1 }
4438c4b7 149use warnings ;
0453d815 150my $b ;
151chop $b ;
152EXPECT
146174a9 153Use of uninitialized value in scalar chop at - line 6.
0453d815 154########
155
4438c4b7 156# Check interaction of $^W and use warnings
0453d815 157BEGIN { $^W = 1 }
4438c4b7 158no warnings ;
0453d815 159my $b ;
160chop $b ;
161EXPECT
162
163########
164
4438c4b7 165# Check interaction of $^W and use warnings
166no warnings ;
0453d815 167BEGIN { $^W = 1 }
168my $b ;
169chop $b ;
170EXPECT
171
172########
173
4438c4b7 174# Check interaction of $^W and use warnings
0453d815 175BEGIN { $^W = 1 }
176{
4438c4b7 177 no warnings ;
0453d815 178 my $b ;
179 chop $b ;
180}
181my $b ;
182chop $b ;
183EXPECT
146174a9 184Use of uninitialized value in scalar chop at - line 10.
0453d815 185########
186
4438c4b7 187# Check interaction of $^W and use warnings
0453d815 188BEGIN { $^W = 0 }
189{
4438c4b7 190 use warnings ;
0453d815 191 my $b ;
192 chop $b ;
193}
194my $b ;
195chop $b ;
196EXPECT
146174a9 197Use of uninitialized value in scalar chop at - line 7.