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/Server/Nginx.pm »
1 package Lemonldap::NG::Handler::Main::SharedVariables;
2  
3 26 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 26 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 BEGIN {
13 # Thread shared properties (if threads are available: needs to be loaded elsewhere)
14 26 ▶ our $_tshv = {
Subroutine BEGIN: called CC=5 SCAR=16.1
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 26 our $_v = { data => {}, dataUpdate => {}, };
32  
33 # Thread shared accessors
34 26 foreach ( keys %$_tshv ) {
35 338 ▶ 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 44 33 77
if defined $v 45 24 69
if defined $v 45 124 169
if defined $v 96 164 260
if defined $v 96 2 98
if defined $v 41 161 202
if defined $v 55 0 55
if defined $v 33 123 156
if defined $v 0 0 0
if defined $v 43 529 572
if defined $v 44 2363 2407
if defined $v 0 19837 19837
if defined $v 44 44 88
36 my \$v = \$_[1];
37 \$_tshv->{$_} = \$v if (defined \$v);
38 return \$_tshv->{$_};
39 }";
40 338 ▶ die $@ if ($@);
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 338 338
41 }
42  
43 # Current session accessors
44 26 eval "threads::shared::share(\$_tshv);";
45 26 foreach ( keys %$_v ) {
46 52 ▶ 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 165 152 317
if $v 44 35 79
47 my \$v = \$_[1];
48 \$_v->{$_} = \$v if (\$v);
49 return \$_v->{$_};
50 }";
51 52 ▶ die $@ if ($@);
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 52 52
52 }
53 }
54  
55 26 1;
« Lemonldap/NG/Handler/Server/Traefik.pm ↑ Summary Lemonldap/NG/Handler/Server/Nginx.pm »