line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::CompileLevel; |
2
|
1
|
|
|
1
|
|
68009
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
4
|
1
|
|
|
1
|
|
5
|
no warnings 'once'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.001004'; |
7
|
|
|
|
|
|
|
$VERSION =~ tr/_//d; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use Exporter (); BEGIN { *import = \&Exporter::import } |
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
|
1
|
|
|
|
|
75
|
|
10
|
|
|
|
|
|
|
BEGIN { |
11
|
1
|
50
|
|
1
|
|
66
|
*_WARNING_BITS_CHECK = "$]" <= 5.030001 ? sub(){1} : sub(){0}; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
15
|
|
|
|
|
|
|
compile_level |
16
|
|
|
|
|
|
|
compile_caller |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub compile_level () { |
20
|
1
|
|
|
1
|
|
7
|
no warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
298
|
|
21
|
15
|
|
|
15
|
1
|
833
|
if (_WARNING_BITS_CHECK) { |
22
|
15
|
|
|
|
|
76
|
local ${^WARNING_BITS} = $warnings::NONE; |
23
|
15
|
|
|
|
|
25
|
my $level = 0; |
24
|
15
|
|
|
|
|
162
|
while (my @caller = caller(++$level)) { |
25
|
39
|
|
|
|
|
97
|
my $hints = $caller[9]; |
26
|
|
|
|
|
|
|
next |
27
|
39
|
100
|
|
|
|
228
|
if $hints ne ${^WARNING_BITS}; |
28
|
11
|
|
|
|
|
31
|
${^WARNING_BITS} ^= "\x01"; |
29
|
11
|
|
|
|
|
54
|
my $newhints = (caller($level))[9]; |
30
|
11
|
50
|
|
|
|
29
|
if ($newhints ne $hints) { |
31
|
11
|
|
|
|
|
55
|
return $level - 1; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
else { |
36
|
|
|
|
|
|
|
my $level = 0; |
37
|
|
|
|
|
|
|
while (my @caller = caller(++$level)) { |
38
|
|
|
|
|
|
|
return $level - 1 |
39
|
|
|
|
|
|
|
if $caller[3] =~ /::BEGIN\z/; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
4
|
|
|
|
|
15
|
return undef; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub compile_caller () { |
46
|
8
|
|
|
8
|
1
|
1490
|
my $level = compile_level; |
47
|
|
|
|
|
|
|
return |
48
|
8
|
100
|
|
|
|
23
|
unless defined $level; |
49
|
|
|
|
|
|
|
|
50
|
7
|
100
|
|
|
|
20
|
if (caller eq 'DB') { |
51
|
|
|
|
|
|
|
package |
52
|
|
|
|
|
|
|
DB; |
53
|
1
|
|
|
|
|
8
|
caller($level - 1); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
else { |
56
|
6
|
|
|
|
|
45
|
caller($level - 1); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__END__ |