| 1 | package Lemonldap::NG::Common::Logger::Std; | ||||||||||||
| 2 | |||||||||||||
| 3 | 4 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | 1 | our $VERSION = '2.0.15'; | |||||||||||
| 6 | |||||||||||||
| 7 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=6 SCAR=18.0
Pod
undocumented
| |||||||||||||
| 8 | 4 | ▶ | no warnings 'redefine'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 2 | ▶ | my $level = $_[1]->{logLevel} || 'info'; | ||||||||||
|
Condition50%1/2
$_[1]{'logLevel'} || 'info'
MC/DC0%0/1
$_[1]{'logLevel'} || 'info'
$_[1]{'logLevel'}
Truth table50%1/2
A
A= $_[1]{'logLevel'}
| |||||||||||||
| 10 | 2 | my $show = 1; | |||||||||||
| 11 | |||||||||||||
| 12 | 2 | foreach (qw(error warn notice info debug)) { | |||||||||||
| 13 | 10 | ▶ | if ($show) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 14 | eval | ||||||||||||
| 15 | 2 | qq'sub $_ {print STDERR "[".localtime."] [LLNG:\$\$] [$_] \$_[1]\n"}'; | |||||||||||
| 16 | } | ||||||||||||
| 17 | else { | ||||||||||||
| 18 | 0 | ▶ | eval qq'sub $_ {1}'; | ||||||||||
|
Subroutine
debug: called CC=1 SCAR=0.1
Subroutine
info: called CC=1 SCAR=0.1
Subroutine
notice: called CC=1 SCAR=0.1
Subroutine
warn: not called CC=1 SCAR=0.1
Pod
undocumented
Pod
undocumented
Pod
undocumented
Pod
undocumented
| |||||||||||||
| 19 | } | ||||||||||||
| 20 | 10 | ▶ | $show = 0 if ( $level eq $_ ); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 21 | } | ||||||||||||
| 22 | 2 | ▶ | die "Unknown logLevel $level" if $show; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 23 | |||||||||||||
| 24 | 2 | return bless {}, shift; | |||||||||||
| 25 | } | ||||||||||||
| 26 | |||||||||||||
| 27 | 1 | 1; | |||||||||||