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