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