Commit | Line | Data |
0453d815 |
1 | Check default warnings |
2 | |
3 | __END__ |
4 | # default warning should be displayed if you don't add anything |
5 | # optional shouldn't |
6 | my $a = oct "7777777777777777777777777777777777779" ; |
7 | EXPECT |
8 | Integer overflow in octal number at - line 3. |
9 | ######## |
10 | # no warning should be displayed |
11 | no warning ; |
12 | my $a = oct "7777777777777777777777777777777777779" ; |
13 | EXPECT |
252aa082 |
14 | Integer overflow in octal number at - line 3. |
0453d815 |
15 | ######## |
16 | # all warning should be displayed |
17 | use warning ; |
252aa082 |
18 | my $a = oct "77777777797"; |
0453d815 |
19 | EXPECT |
0453d815 |
20 | Illegal octal digit '9' ignored at - line 3. |
21 | ######## |
22 | # check scope |
23 | use warning ; |
252aa082 |
24 | my $a = oct "77777777797"; |
0453d815 |
25 | { |
26 | no warning ; |
252aa082 |
27 | my $b = oct "77777777797"; |
0453d815 |
28 | } |
29 | my $c = oct "7777777777777777777777777777777777779" ; |
30 | EXPECT |
0453d815 |
31 | Illegal octal digit '9' ignored at - line 3. |
252aa082 |
32 | Octal number > 037777777777 non-portable at - line 8. |
0453d815 |
33 | Integer overflow in octal number at - line 8. |