line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package warnings::illegalproto; |
2
|
|
|
|
|
|
|
$warnings::illegalproto::VERSION = '0.001003'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Disable illegal prototype warnings on old Perls |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $WARN; |
6
|
|
|
|
|
|
|
{ |
7
|
2
|
|
|
2
|
|
85038
|
no warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
76
|
|
8
|
2
|
|
|
2
|
|
11
|
use warnings 'syntax'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
99
|
|
9
|
2
|
|
|
|
|
127
|
no warnings qw( |
10
|
|
|
|
|
|
|
ambiguous |
11
|
|
|
|
|
|
|
bareword |
12
|
|
|
|
|
|
|
digit |
13
|
|
|
|
|
|
|
parenthesis |
14
|
|
|
|
|
|
|
precedence |
15
|
|
|
|
|
|
|
printf |
16
|
|
|
|
|
|
|
prototype |
17
|
|
|
|
|
|
|
qw |
18
|
|
|
|
|
|
|
reserved |
19
|
|
|
|
|
|
|
semicolon |
20
|
2
|
|
|
2
|
|
10
|
); |
|
2
|
|
|
|
|
9
|
|
21
|
2
|
|
|
2
|
|
51
|
BEGIN { $WARN = ${^WARNING_BITS} }; |
22
|
|
|
|
|
|
|
} |
23
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
249
|
|
24
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
153
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
BEGIN { |
27
|
2
|
50
|
|
2
|
|
261
|
*_ILLEGALPROTO_SUPPORTED = $] >= 5.012 ? sub(){1} : sub(){0}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub import { |
31
|
1
|
|
|
1
|
|
7
|
if (_ILLEGALPROTO_SUPPORTED) { |
32
|
1
|
|
|
|
|
2652
|
warnings->import('illegalproto') |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
else { |
35
|
|
|
|
|
|
|
${^WARNING_BITS} |= $WARN |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub unimport { |
40
|
1
|
|
|
1
|
|
8
|
if (_ILLEGALPROTO_SUPPORTED) { |
41
|
1
|
|
|
|
|
2020
|
warnings->unimport('illegalproto') |
42
|
|
|
|
|
|
|
} else { |
43
|
|
|
|
|
|
|
${^WARNING_BITS} &= ~ $WARN |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |