| 1 | package Net::FreeIPA::DummyLogger; | ||||||||||||||||||||
| 2 | 6 | $Net::FreeIPA::DummyLogger::VERSION = '3.0.3'; | |||||||||||||||||||
| 3 | 6 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 6 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | =head1 NAME | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | Net::FreeIPA::DummyLogger provides dummy logger with log4perl interface | ||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | =head2 Public methods | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | =over | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | =item new | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | =cut | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | sub new | ||||||||||||||||||||
| 19 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 20 | 0 | my $this = shift; | |||||||||||||||||||
| 21 | 0 | ▶ | my $class = ref($this) || $this; | ||||||||||||||||||
|
Condition0%0/3
ref $this || $this
MC/DC0%0/2
ref $this || $this
ref $this
$this
Truth table0%0/3
A || B
A= ref $thisB= $this
| |||||||||||||||||||||
| 22 | 0 | my $self = {}; # here, it gives a reference on a hash | |||||||||||||||||||
| 23 | 0 | bless $self, $class; | |||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 0 | return $self; | |||||||||||||||||||
| 26 | }; | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | # Mock basic methods of Log4Perl getLogger instance | ||||||||||||||||||||
| 29 | 6 | ▶ | no strict 'refs'; ## no critic | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 30 | 6 | foreach my $i (qw(error warn info debug)) { | |||||||||||||||||||
| 31 | 24 | ▶ | *{$i} = sub {} | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 32 | 24 | } | |||||||||||||||||||
| 33 | 6 | ▶ | use strict 'refs'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | =pod | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | =back | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | =cut | ||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 6 | 1; | |||||||||||||||||||