Lemonldap/NG/Handler/Main/SharedVariables.pm

filter: Statementstmt 94.9% 56 / 59 Branchbran 82.3% 28 / 34 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 94.1% 16 / 17 Podpod 0.0% 0 / 14 totaltotal 80.6% 100 / 124 CC 20 SCAR 8.7
CC
20
Cov
90%
BEGIN
5.0
_auditLogger
2.0
cfgDate
2.0
CRAP 2.4
« Lemonldap/NG/Handler/Server/Traefik.pm ↑ Summary Lemonldap/NG/Handler/Lib/AuthBasic.pm »
1 package Lemonldap::NG::Handler::Main::SharedVariables;
2  
3 29 our $VERSION = '2.19.0';
4  
5 # Since handler has no instance but only static classes, this module provides
6 # classes properties with accessors
7  
8 package Lemonldap::NG::Handler::Main;
9  
10 29 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 29 ▶BEGIN {
Subroutine BEGIN: called CC=5 SCAR=16.1
13 # Thread shared properties (if threads are available: needs to be loaded elsewhere)
14 29 our $_tshv = {
15 tsv => {},
16 cfgNum => 0,
17 cfgDate => 0,
18 checkMsg => 5,
19 lastCheck => 0,
20 lastCheckMsg => 0,
21 checkTime => 600,
22 confAcc => {},
23 logger => {},
24 userLogger => {},
25 _auditLogger => {},
26 lmConf => {},
27 localConfig => {},
28 };
29  
30 # Current sessions properties
31 29 our $_v = { data => {}, dataUpdate => {}, };
32  
33 # Thread shared accessors
34 29 foreach ( keys %$_tshv ) {
35 0 ▶ eval " sub $_ {
Subroutine _auditLogger: called CC=2 SCAR=7.0
Subroutine cfgDate: called CC=2 SCAR=7.0
Subroutine cfgNum: called CC=2 SCAR=7.0
Subroutine checkMsg: called CC=2 SCAR=7.0
Subroutine checkTime: called CC=2 SCAR=7.0
Subroutine confAcc: called CC=2 SCAR=7.0
Subroutine lastCheck: called CC=2 SCAR=7.0
Subroutine lastCheckMsg: called CC=2 SCAR=7.0
Subroutine lmConf: not called CC=2 SCAR=7.0
Subroutine localConfig: called CC=2 SCAR=7.0
Subroutine logger: called CC=2 SCAR=7.0
Subroutine tsv: called CC=2 SCAR=7.0
Subroutine userLogger: called CC=2 SCAR=7.0
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Branch: 13 branches
BranchTrueFalseTotal
if defined $v 48 65 113
if defined $v 49 24 73
if defined $v 49 130 179
if defined $v 104 207 311
if defined $v 104 13 117
if defined $v 45 173 218
if defined $v 59 0 59
if defined $v 36 162 198
if defined $v 0 0 0
if defined $v 47 586 633
if defined $v 48 2956 3004
if defined $v 0 24138 24138
if defined $v 48 48 96
36 my \$v = \$_[1];
37 \$_tshv->{$_} = \$v if (defined \$v);
38 return \$_tshv->{$_};
39 }";
40 377 ▶ die $@ if ($@);
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 377 377
41 }
42  
43 # Current session accessors
44 29 eval "threads::shared::share(\$_tshv);";
45 29 foreach ( keys %$_v ) {
46 58 ▶ eval " sub $_ {
Subroutine data: called CC=2 SCAR=6.9
Subroutine dataUpdate: called CC=2 SCAR=6.9
Pod undocumented
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
if $v 251 207 458
if $v 69 44 113
47 my \$v = \$_[1];
48 \$_v->{$_} = \$v if (\$v);
49 return \$_v->{$_};
50 }";
51 58 ▶ die $@ if ($@);
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 58 58
52 }
53 }
54  
55 29 1;
« Lemonldap/NG/Handler/Server/Traefik.pm ↑ Summary Lemonldap/NG/Handler/Lib/AuthBasic.pm »