blib/lib/Lemonldap/NG/Portal/Lib/OverConf.pm

filter: Statementstmt 100% 21 / 21 Branchbran 66.6% 4 / 6 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 2 totaltotal 78.9% 30 / 38 CC 5 SCAR 9.7
CC
5
Cov
87%
loadPlugin
3.3
loadModule
3.0
BEGIN
1.0
CRAP 2.6
« blib/lib/Lemonldap/NG/Portal/Plugins/RememberAuthChoice.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Auth/DBI.pm »
1 package Lemonldap::NG::Portal::Lib::OverConf;
2  
3 342 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 342 ▶use Mouse::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # To avoid "tied" destroy, tied configurations are kept here
7 342 our @overC;
8  
9 # Override portal loadPlugin() to use a wrapped configuration
10 546 ▶sub loadPlugin {
Subroutine loadPlugin: called CC=3 SCAR=12.0
Pod undocumented
11 546 my ( $self, $plugin, $over, %args ) = @_;
12 546 my $obj = $self->loadModule( $plugin, $over, %args );
13 546 ▶ return 0
Branch: 1 branch
BranchTrueFalseTotal
unless $obj and $obj = $self->p->findEP($plugin, $obj) 0 546 546
Condition33%1/3
$obj and $obj = $self->p->findEP($plugin, $obj)
!ll&&!rl&&r
00546
MC/DC0%0/2
$obj and $obj = $self->p->findEP($plugin, $obj)
$obj $obj = $self->p->findEP($plugin, $obj)
Truth table33%1/3
A and B
A= $objB= $obj = $self->p->findEP($plugin, $obj)
ABresult
0X0
100
111
14 unless ( $obj and $obj = $self->p->findEP( $plugin, $obj ) );
15 546 return $obj;
16 }
17  
18 818 ▶sub loadModule {
Subroutine loadModule: called CC=3 SCAR=11.0
Pod undocumented
19 818 my ( $self, $plugin, $over, %args ) = @_;
20 818 my $obj;
21 my $nc;
22 818 ▶ if ($over) {
Branch: 1 branch
BranchTrueFalseTotal
if ($over) { } 248 570 818
23 248 require Lemonldap::NG::Common::Conf::Wrapper;
24 248 tie %$nc, 'Lemonldap::NG::Common::Conf::Wrapper', $self->conf, $over;
25 248 push @overC, $nc;
26 }
27 else {
28 570 $nc = $self->conf;
29 }
30 818 ▶ return 0
Branch: 1 branch
BranchTrueFalseTotal
unless $obj = $self->p->loadModule("$plugin", $nc, %args) 0 818 818
31 unless ( $obj = $self->p->loadModule( "$plugin", $nc, %args ) );
32 818 return $obj;
33 }
34  
35 342 1;
« blib/lib/Lemonldap/NG/Portal/Plugins/RememberAuthChoice.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Auth/DBI.pm »