« 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
| |||||||||||
| 12 | 6 | $self->{logger} = $args{logger}->new(@_); | |||||||||
| 13 | 6 | ▶ | $self->{dup} = $args{dup} or die 'Missing dup'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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
| |||||||||||
| 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
| |||||||||||
| 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
| |||||||||||
| 38 | 19 | $self->{logger}->$AUTOLOAD(@_); | |||||||||
| 39 | 19 | ▶ | return if $AUTOLOAD !~ m/^(?:error|warn|notice|info|debug)$/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | 16 | my $msg = shift; | |||||||||
| 41 | 16 | $msg = "[$AUTOLOAD] $msg"; | |||||||||
| 42 | 16 | $self->{dup}->debug( $msg, @_ ); | |||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | 3 | 1; | |||||||||