| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Log::ger::Plugin::OptAway; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $DATE = '2017-07-11'; # DATE |
|
4
|
|
|
|
|
|
|
our $VERSION = '0.004'; # VERSION |
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
40186
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
36
|
|
|
7
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
619
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub get_hooks { |
|
10
|
1
|
|
|
1
|
0
|
20
|
my %conf = @_; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
return { |
|
13
|
|
|
|
|
|
|
after_install_routines => [ |
|
14
|
|
|
|
|
|
|
__PACKAGE__, 99, |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub { |
|
17
|
2
|
|
|
2
|
|
4756
|
require B::CallChecker; |
|
18
|
2
|
|
|
|
|
3155
|
require B::Generate; |
|
19
|
|
|
|
|
|
|
|
|
20
|
2
|
|
|
|
|
2496
|
my %args = @_; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# we are only relevant when targetting package |
|
23
|
2
|
50
|
50
|
|
|
19
|
return [undef] unless ($args{target}||'') eq 'package'; |
|
24
|
|
|
|
|
|
|
|
|
25
|
2
|
|
|
|
|
7
|
for my $r (@{ $args{routines} }) { |
|
|
2
|
|
|
|
|
10
|
|
|
26
|
24
|
|
|
|
|
81
|
my ($code, $name, $lnum, $type) = @$r; |
|
27
|
24
|
100
|
|
|
|
107
|
next unless $type =~ /\Alog_/; |
|
28
|
12
|
|
|
|
|
44
|
my $fullname = "$args{target_arg}\::$name"; |
|
29
|
12
|
100
|
|
|
|
47
|
if ($Log::ger::Current_Level < $r->[2]) { |
|
30
|
|
|
|
|
|
|
#print "D:no-oping $fullname\n"; |
|
31
|
|
|
|
|
|
|
B::CallChecker::cv_set_call_checker( |
|
32
|
6
|
|
|
|
|
70
|
\&{$fullname}, |
|
33
|
4
|
|
|
|
|
2372
|
sub { B::SVOP->new("const",0,!1) }, |
|
34
|
6
|
|
|
|
|
15
|
\!1, |
|
35
|
|
|
|
|
|
|
); |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
} |
|
38
|
2
|
|
|
|
|
16
|
[1]; |
|
39
|
1
|
|
|
|
|
12
|
}], |
|
40
|
|
|
|
|
|
|
}; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
|
44
|
|
|
|
|
|
|
# ABSTRACT: Optimize away higher-level log statements |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |