| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Log::ger::OptAway; | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | our $DATE = '2017-06-21'; # DATE | 
| 4 |  |  |  |  |  |  | our $VERSION = '0.002'; # VERSION | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 1 |  |  | 1 |  | 23290 | use strict; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 23 |  | 
| 7 | 1 |  |  | 1 |  | 5 | use warnings; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 19 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 1 |  |  | 1 |  | 4 | use Log::ger::Util; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 172 |  | 
| 10 |  |  |  |  |  |  |  | 
| 11 | 0 |  |  | 0 | 0 | 0 | sub PRIO_after_install_log_routine { 99 } | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | sub after_install_log_routine { | 
| 14 | 0 |  |  | 0 | 0 | 0 | require B::CallChecker; | 
| 15 | 0 |  |  |  |  | 0 | require B::Generate; | 
| 16 |  |  |  |  |  |  |  | 
| 17 | 0 |  |  |  |  | 0 | my ($self, %args) = @_; | 
| 18 | 0 | 0 |  |  |  | 0 | return [undef] unless $args{target} eq 'package'; | 
| 19 |  |  |  |  |  |  |  | 
| 20 | 0 |  |  |  |  | 0 | my $fullname = "$args{target_arg}\::log_$args{str_level}"; | 
| 21 | 0 | 0 |  |  |  | 0 | if ($Log::ger::Current_Level < $args{level}) { | 
| 22 |  |  |  |  |  |  | #print "D:no-oping $fullname\n"; | 
| 23 |  |  |  |  |  |  | B::CallChecker::cv_set_call_checker( | 
| 24 | 0 |  |  |  |  | 0 | \&{$fullname}, | 
| 25 | 0 |  |  | 0 |  | 0 | sub { B::SVOP->new("const",0,!1) }, | 
| 26 | 0 |  |  |  |  | 0 | \!1, | 
| 27 |  |  |  |  |  |  | ); | 
| 28 |  |  |  |  |  |  | } | 
| 29 | 0 |  |  |  |  | 0 | [undef]; | 
| 30 |  |  |  |  |  |  | } | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | sub import { | 
| 33 | 1 |  |  | 1 |  | 7 | my $self = shift; | 
| 34 |  |  |  |  |  |  |  | 
| 35 | 1 |  |  |  |  | 2 | my $caller = caller(0); | 
| 36 |  |  |  |  |  |  |  | 
| 37 | 1 |  |  |  |  | 679 | Log::ger::Util::add_plugin('after_install_log_routine', __PACKAGE__); | 
| 38 |  |  |  |  |  |  | } | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | 1; | 
| 41 |  |  |  |  |  |  | # ABSTRACT: Optimize away higher-level log statements | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | __END__ |