blib/lib/Lemonldap/NG/Common/Logger/_Duplicate.pm

filter: Statementstmt 93.5% 29 / 31 Branchbran 66.6% 8 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 3 totaltotal 82.6% 43 / 52 CC 7 SCAR 8.7
CC
7
Cov
86%
new
3.1
AUTOLOAD
3.0
setRequestObj
2.1
CRAP 2.4
« blib/lib/Lemonldap/NG/Common/Apache/Session/Generate/SHA256.pm ↑ Summary blib/lib/Lemonldap/NG/Common/Lib/DBI.pm »
1 package Lemonldap::NG::Common::Logger::_Duplicate;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 our $VERSION = '2.23.0';
6  
7 6 ▶sub new {
Subroutine new: called CC=3 SCAR=11.2
Pod undocumented
8 6 my $self = bless {}, shift;
9 6 my ( $conf, %args ) = @_;
10 6 eval "require $args{logger}";
11 6 ▶ die $@ if ($@);
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 6 6
12 6 $self->{logger} = $args{logger}->new(@_);
13 6 ▶ $self->{dup} = $args{dup} or die 'Missing dup';
Branch: 1 branch
BranchTrueFalseTotal
$self->{"dup"} = $args{"dup"} or die "Missing dup" 6 0 6
14 6 return $self;
15 }
16  
17 8 ▶sub setRequestObj {
Subroutine setRequestObj: called CC=2 SCAR=7.6
Pod undocumented
18 8 my $self = shift;
19 8 ▶ if ( $self->{logger}->can('setRequestObj') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"logger"}->can("setRequestObj")) 0 8 8
20 0 return $self->{logger}->setRequestObj(@_);
21 }
22 8 return;
23 }
24  
25 8 ▶sub clearRequestObj {
Subroutine clearRequestObj: called CC=2 SCAR=7.6
Pod undocumented
26 8 my $self = shift;
27 8 ▶ if ( $self->{logger}->can('clearRequestObj') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"logger"}->can("clearRequestObj")) 0 8 8
28 0 return $self->{logger}->clearRequestObj(@_);
29 }
30 8 return;
31 }
32  
33 25 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=3 SCAR=11.0
34 25 my $self = shift;
35 3 ▶ no strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
36 25 $AUTOLOAD =~ s/.*:://;
37 25 ▶ return if $AUTOLOAD eq 'DESTROY';
Branch: 1 branch
BranchTrueFalseTotal
if $AUTOLOAD eq "DESTROY" 6 19 25
38 19 $self->{logger}->$AUTOLOAD(@_);
39 19 ▶ return if $AUTOLOAD !~ m/^(?:error|warn|notice|info|debug)$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $AUTOLOAD =~ /^(?:error|warn|notice|info|debug)$/ 3 16 19
40 16 my $msg = shift;
41 16 $msg = "[$AUTOLOAD] $msg";
42 16 $self->{dup}->debug( $msg, @_ );
43 }
44  
45 3 1;
« blib/lib/Lemonldap/NG/Common/Apache/Session/Generate/SHA256.pm ↑ Summary blib/lib/Lemonldap/NG/Common/Lib/DBI.pm »