blib/lib/Lemonldap/NG/Portal/Main/Auth.pm

filter: Statementstmt 90.0% 18 / 20 Branchbran 70.0% 7 / 10 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 2 totaltotal 75.6% 31 / 41 CC 7 SCAR 17.4
CC
7
Cov
82%
initDisplay
7.6
stop
2.0
BEGIN
1.0
CRAP 5.7
« blib/lib/Lemonldap/NG/Portal/Lib/LazyLoadedConfiguration.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Main/Plugin.pm »
1 package Lemonldap::NG::Portal::Main::Auth;
2  
3 322 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 322 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 322 our $VERSION = '2.0.15';
7  
8 322 extends 'Lemonldap::NG::Portal::Main::Plugin';
9  
10 # PROPERTIES
11  
12 322 has authnLevel => ( is => 'rw' );
13  
14 0 ▶sub stop { return 0 }
Subroutine stop: not called CC=1 SCAR=6.9
Pod undocumented
15  
16 # initDisplay is called by the Choice module to prepare the request object.
17 # Before 2.20, AjaxInitScript and InitCmd were called separately.
18 sub initDisplay {
19 20 ▶ my ( $self, $req ) = @_;
Subroutine initDisplay: called CC=7 SCAR=20.2
Pod undocumented
20  
21 20 ▶ if ( $self->{AjaxInitScript} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"AjaxInitScript"}) 2 18 20
22 $self->logger->debug( 'Append ' . $self->{Name} . ' init/script' )
23 2 ▶ if $self->{Name};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"Name"} 2 0 2
24 2 $req->data->{customScript} .= $self->AjaxInitScript;
25 }
26 20 ▶ if ( $self->can('InitCmd') and my $cmd = $self->InitCmd ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->can("InitCmd") and my $cmd = $self->InitCmd) 2 18 20
Condition66%2/3
$self->can("InitCmd") and my $cmd = $self->InitCmd
!ll&&!rl&&r
1802
MC/DC50%1/2
$self->can("InitCmd") and my $cmd = $self->InitCmd
$self->can("InitCmd") my $cmd = $self->InitCmd
Truth table66%2/3
A and B
A= $self->can("InitCmd")B= my $cmd = $self->InitCmd
ABresult
0X0
100
111
27 $self->logger->debug( 'Launch ' . $self->{Name} . ' init command' )
28 2 ▶ if $self->{Name};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"Name"} 2 0 2
29 2 my $res = eval( $self->{InitCmd} );
30 2 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 2 2
31 0 die "Error running InitCmd: $@";
32 }
33  
34 }
35 }
36  
37 322 1;
« blib/lib/Lemonldap/NG/Portal/Lib/LazyLoadedConfiguration.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Main/Plugin.pm »