FreeIPA/Base.pm

filter: Statementstmt 65.3% 17 / 26 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 4 / 6 Podpod 100% 1 / 1 totaltotal 52.3% 22 / 42 CC 4 SCAR 17.0
CC
4
Cov
52%
new
12.0
__ANON__
4.5
BEGIN
1.0
CRAP 5.4
« FreeIPA/API/Function.pm ↑ Summary FreeIPA/API/Magic.pm »
1 package Net::FreeIPA::Base;
2 6 $Net::FreeIPA::Base::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  
7 =head1 NAME
8  
9 Net::FreeIPA::Base provides basic class structure for Net::FreeIPA
10  
11 =head2 Public methods
12  
13 =over
14  
15 =item new
16  
17 =cut
18  
19 sub new
20 0 ▶{
Subroutine new: not called CC=3 SCAR=24.8
Pod documented
21 0 my $this = shift;
22 0 ▶ my $class = ref($this) || $this;
Condition0%0/3
ref $this || $this
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $this || $this
ref $this $this
Truth table0%0/3
A || B
A= ref $thisB= $this
ABresult
1X1
011
000
23 0 my $self = {}; # here, it gives a reference on a hash
24 0 bless $self, $class;
25  
26 0 ▶ return $self->_initialize(@_) ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->_initialize(@_) ? : 0 0 0
27 };
28  
29 =item error, warn, info, debug
30  
31 Convenience methods to access the log instance that might
32 be passed during initialisation and set to $self->{log}.
33  
34 =cut
35  
36 6 ▶no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
37 6 foreach my $i (qw(error warn info debug)) {
38 24 ▶ *{$i} = sub {
Subroutine __ANON__: not called CC=2 SCAR=15.1
39 0 my ($self, @args) = @_;
40 0 ▶ if ($self->{log}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'log'}) { } 0 0 0
41 0 return $self->{log}->$i(@args);
42 } else {
43 0 return;
44 }
45 }
46 24 }
47 6 ▶use strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
48  
49 =pod
50  
51 =back
52  
53 =cut
54  
55 6 1;
« FreeIPA/API/Function.pm ↑ Summary FreeIPA/API/Magic.pm »