blib/lib/Lemonldap/NG/Common/Conf.pm

filter: Statementstmt 77.9% 244 / 313 Branchbran 62.2% 102 / 164 Conditioncond 59.5% 53 / 89 MC/DCmcdc 34.6% 17 / 49 Subroutinesub 80.4% 33 / 41 Podpod 5.2% 1 / 19 totaltotal 66.6% 450 / 675 CC 121 SCAR 37.3
CC
121
Cov
70%
saveConf
210.0
getLocalConf
86.7
getConf
30.3
CRAP 41.9
« blib/lib/Lemonldap/NG/Common/Logger/Sentry.pm ↑ Summary blib/lib/Lemonldap/NG/Common/Notifications/JSON.pm »
1 ##@file
2 # Base package for Lemonldap::NG configuration system
3  
4 ##@class
5 # Implements Lemonldap::NG shared configuration system.
6 # In case of error or warning, the message is stored in the global variable
7 # $Lemonldap::NG::Common::Conf::msg
8 package Lemonldap::NG::Common::Conf;
9  
10 16 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 16 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 16 ▶no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 16 ▶use Lemonldap::NG::Common::Conf::Constants; #inherits
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 # Import compacter
16 16 ▶use Lemonldap::NG::Common::Conf::Compact;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 16 *compactConf = \&Lemonldap::NG::Common::Conf::Compact::compactConf;
18  
19 # TODO: don't import this big file, use a proxy
20 16 ▶use Lemonldap::NG::Common::Conf::DefaultValues; #inherits
Subroutine BEGIN: called CC=1 SCAR=0.0
21 use Lemonldap::NG::Common::Crypto
22 16 ▶ ; #link protected cipher Object "cypher" in configuration hash
Subroutine BEGIN: called CC=1 SCAR=0.0
23 16 ▶use Config::IniFiles;
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 #inherits Lemonldap::NG::Common::Conf::Backends::File
26 #inherits Lemonldap::NG::Common::Conf::Backends::DBI
27 #inherits Lemonldap::NG::Common::Conf::Backends::SOAP
28 #inherits Lemonldap::NG::Common::Conf::Backends::LDAP
29  
30 16 our $VERSION = '2.23.0';
31 16 our $msg = '';
32 16 our $iniObj;
33  
34 16 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
35 16 eval {
36 16 require threads::shared;
37 16 threads::shared::share($iniObj);
38 };
39 }
40  
41 ## @cmethod Lemonldap::NG::Common::Conf new(hashRef arg)
42 # Constructor.
43 # Succeed if it has found a way to access to Lemonldap::NG configuration with
44 # $arg (or default file). It can be :
45 # - Nothing: default configuration file is tested,
46 # - { confFile => "/path/to/storage.conf" },
47 # - { Type => "File", dirName => "/path/to/conf/dir/" },
48 # - { Type => "DBI", dbiChain => "DBI:MariaDB:database=lemonldap-ng;host=1.2.3.4",
49 # dbiUser => "user", dbiPassword => "password" },
50 # - { Type => "SOAP", proxy => "https://auth.example.com/config" },
51 # - { Type => "LDAP", ldapServer => "ldap://localhost", ldapConfBranch => "ou=conf,ou=applications,dc=example,dc=com",
52 # ldapBindDN => "cn=manager,dc=example,dc=com", ldapBindPassword => "secret"},
53 #
54 # $self->{type} contains the type of configuration access system and the
55 # corresponding package is loaded.
56 # @param $arg hash reference or hash table
57 # @return New Lemonldap::NG::Common::Conf object
58 28 ▶sub new {
Subroutine new: called CC=15 SCAR=27.6
Pod documented
59 28 my $class = shift;
60 28 my $self = bless {}, $class;
61 28 ▶ if ( ref( $_[0] ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_[0]) { } 19 9 28
62 19 %$self = %{ $_[0] };
63 }
64 else {
65 9 ▶ if ( (@_) && $#_ % 2 == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and $#_ % 2 == 1) 9 0 9
Condition33%1/3
@_ and $#_ % 2 == 1
!ll&&!rl&&r
009
MC/DC0%0/2
@_ and $#_ % 2 == 1
@_ $#_ % 2 == 1
Truth table33%1/3
A and B
A= @_B= $#_ % 2 == 1
ABresult
0X0
100
111
66 9 %$self = @_;
67 }
68 }
69 28 ▶ unless ( $self->{mdone} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"mdone"}) 28 0 28
70 28 ▶ unless ( $self->{type} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"type"}) 11 17 28
71  
72 # Use local conf to get configStorage and localStorage
73 my $localConfAccessPrms =
74 11 $self->getLocalConf( CONFSECTION, $self->{confFile}, 0 );
75  
76 11 ▶ if ( defined $localConfAccessPrms ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $localConfAccessPrms) 11 0 11
77 11 %$self = ( %$self, %$localConfAccessPrms );
78 11 $self->replacePlaceholders($localConfAccessPrms);
79  
80 # localConfAccessPrms might have changed so we need to
81 # update $self
82 11 %$self = ( %$self, %$localConfAccessPrms );
83 }
84 }
85 28 ▶ unless ( $self->{type} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"type"}) 0 28 28
86 0 $msg .= "Error: configStorage: type is not defined.\n";
87 0 return 0;
88 }
89 28 ▶ unless ( $self->{type} =~ /^[\w:]+$/ ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"type"} =~ /^[\w:]+$/) 0 28 28
90 0 $msg .= "Error: configStorage: type is not well formed.\n";
91 }
92 $self->{type} = "Lemonldap::NG::Common::Conf::Backends::$self->{type}"
93 28 ▶ unless $self->{type} =~ /::/;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"type"} =~ /::/ 17 11 28
94 28 eval "require $self->{type}";
95 28 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 1 27 28
96 1 $msg .= "Error: failed to load $self->{type}: \n $@";
97 1 return 0;
98 }
99 27 ▶ return 0 unless $self->prereq;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->prereq 1 26 27
100 26 $self->{mdone}++;
101 26 $msg = "$self->{type} loaded.\n";
102 }
103 26 ▶ if ( $self->{localStorage} and not defined( $self->{refLocalStorage} ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"localStorage"} and not defined $self->{"refLocalStorage"}) 7 19 26
Condition66%2/3
$self->{"localStorage"} and not defined $self->{"refLocalStorage"}
!ll&&!rl&&r
1907
MC/DC50%1/2
$self->{"localStorage"} and not defined $self->{"refLocalStorage"}
$self->{"localStorage"} not defined $self->{"refLocalStorage"}
Truth table66%2/3
A and not(B)
A= $self->{"localStorage"}B= not defined $self->{"refLocalStorage"}
ABresult
0X0
100
111
104 1 ▶ eval "use $self->{localStorage};";
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
105 7 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) { } 0 7 7
106 0 $msg .= "Error: Unable to load $self->{localStorage}: $@.\n";
107 }
108  
109 # TODO: defer that until $> > 0 (to avoid creating local cache with
110 # root privileges
111 else {
112 $self->{refLocalStorage} =
113 7 $self->{localStorage}->new( $self->{localStorageOptions} );
114 }
115 }
116  
117 26 return $self;
118 }
119  
120 ## @method int saveConf(hashRef conf, hash args)
121 # Serialize $conf and call store().
122 # @param $conf Lemonldap::NG configuration hashRef
123 # @param %args Parameters
124 # @return Number of the saved configuration, <=0 in case of error.
125 0 ▶sub saveConf {
Subroutine saveConf: not called CC=14 SCAR=53.5
Pod undocumented
126 0 my ( $self, $conf, %args ) = @_;
127  
128 # noCache => 1 disables the localStorage fallback in lastCfg, so a stale
129 # cached cfgNum cannot let us overwrite a newer central configuration.
130 0 my $last = $self->lastCfg( { noCache => 1 } );
131  
132 # If configuration was modified, return an error
133 0 ▶ if ( not $args{force} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($args{"force"}) 0 0 0
134 0 ▶ if ( $conf->{cfgNum} ne $last
Branch: 1 branch
BranchTrueFalseTotal
if ($conf->{"cfgNum"} ne $last or $args{"cfgDate"} and $args{"cfgDate"} ne $args{"currentCfgDate"}) 0 0 0
Condition0%0/6
$conf->{"cfgNum"} ne $last or $args{"cfgDate"} and $args{"cfgDate"} ne $args{"currentCfgDate"}
l!l&&r!l&&!r
000
$args{"cfgDate"} and $args{"cfgDate"} ne $args{"currentCfgDate"}
!ll&&!rl&&r
000
MC/DC0%0/3
$conf->{"cfgNum"} ne $last or $args{"cfgDate"} and $args{"cfgDate"} ne $args{"currentCfgDate"}
$conf->{"cfgNum"} ne $last $args{"cfgDate"} $args{"cfgDate"} ne $args{"currentCfgDate"}
Truth table0%0/4
A or B and C
A= $conf->{"cfgNum"} ne $lastB= $args{"cfgDate"}C= $args{"cfgDate"} ne $args{"currentCfgDate"}
ABCresult
1XX1
0111
00X0
0100
135 || $args{cfgDate} && $args{cfgDate} ne $args{currentCfgDate} )
136 {
137  
138 0 ▶ if ( $conf->{cfgNum} ne $last ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($conf->{"cfgNum"} ne $last) 0 0 0
139 0 $msg .=
140 "Configuration $last was changed since $conf->{cfgNum}.\n";
141 }
142 0 ▶ if ( $args{cfgDate} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($args{"cfgDate"}) 0 0 0
143 0 $msg .=
144 "Configuration date $args{currentCfgDate}"
145 . " was changed since $args{cfgDate}.\n";
146 }
147  
148 0 return CONFIG_WAS_CHANGED;
149 }
150 0 ▶ if ( $self->isLocked() or not $self->lock() ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->isLocked or not $self->lock) 0 0 0
Condition0%0/3
$self->isLocked or not $self->lock
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->isLocked or not $self->lock
$self->isLocked not $self->lock
Truth table0%0/3
A or not(B)
A= $self->isLockedB= not $self->lock
ABresult
1X1
011
000
151 0 $msg .= "Configuration is locked.\n";
152 0 return DATABASE_LOCKED;
153 }
154 }
155 0 ▶ $conf->{cfgNum} = $last + 1 unless ( $args{cfgNumFixed} );
Branch: 1 branch
BranchTrueFalseTotal
unless $args{"cfgNumFixed"} 0 0 0
156 0 delete $conf->{cipher};
157  
158 # Try to store configuration
159 0 my $tmp = $self->store($conf);
160  
161 0 ▶ unless ( $tmp > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($tmp > 0) 0 0 0
162 0 $msg .= "Error: Configuration $conf->{cfgNum} not stored.\n";
163 0 $self->unlock();
164 0 ▶ return ( $tmp ? $tmp : UNKNOWN_ERROR );
Branch: 1 branch
BranchTrueFalseTotal
$tmp ? : 0 0 0
165 }
166  
167 0 $msg .= "Configuration $conf->{cfgNum} stored.\n";
168 0 $self->setDefault($conf);
169 0 $self->setValuesFromEnv($conf);
170 0 $self->compactConf($conf);
171  
172 0 ▶ if ( Lemonldap::NG::Handler::Main->can('tsv')
Branch: 1 branch
BranchTrueFalseTotal
if ('Lemonldap::NG::Handler::Main'->can('tsv') and 'Lemonldap::NG::Handler::Main'->tsv->{'msgBrokerWriter'}) { } 0 0 0
Condition0%0/3
"Lemonldap::NG::Handler::Main"->can("tsv") and "Lemonldap::NG::Handler::Main"->tsv->{"msgBrokerWriter"}
!ll&&!rl&&r
000
MC/DC0%0/2
"Lemonldap::NG::Handler::Main"->can("tsv") and "Lemonldap::NG::Handler::Main"->tsv->{"msgBrokerWriter"}
"Lemonldap::NG::Handler::Main"->can("tsv") "Lemonldap::NG::Handler::Main"->tsv->{"msgBrokerWriter"}
Truth table0%0/3
A and B
A= "Lemonldap::NG::Handler::Main"->can("tsv")B= "Lemonldap::NG::Handler::Main"->tsv->{"msgBrokerWriter"}
ABresult
0X0
100
111
173 and Lemonldap::NG::Handler::Main->tsv->{msgBrokerWriter} )
174 {
175 Lemonldap::NG::Handler::Main->tsv->{msgBrokerWriter}
176 0 ->publish( $conf->{eventQueueName}, { action => 'newConf' } );
177 }
178 else {
179 0 eval { Lemonldap::NG::Handler::Main->reload() };
180 }
181  
182 0 $self->unlock();
183 0 return $tmp;
184 }
185  
186 ## @method hashRef getConf(hashRef args)
187 # Get configuration from remote configuration storage system or from local
188 # cache if configuration has not been changed. If $args->{local} is set and if
189 # a local configuration is available, remote configuration is not tested.
190 #
191 # Uses lastCfg to test and getDBConf() to get the remote configuration
192 # @param $args Optional, contains {local=>1} or nothing
193 # @return Lemonldap::NG configuration
194 22 ▶sub getConf {
Subroutine getConf: called CC=28 SCAR=34.1
Pod undocumented
195 22 my ( $self, $args ) = @_;
196 22 my $res;
197 22 my $local = $args->{local};
198 22 my $cfgNum = $args->{cfgNum};
199 22 my $localPrm = $args->{localPrm};
200 22 my $noCache = $args->{noCache};
201 22 my $raw = $args->{raw};
202 my $allow_cache_for_root = (
203 $self->{localStorageOptions}
204 ? $self->{localStorageOptions}->{allow_cache_for_root}
205 22 ▶ : 0
Branch: 1 branch
BranchTrueFalseTotal
$self->{'localStorageOptions'} ? : 19 3 22
206 );
207  
208 # If running as UID=0, disabled the cache unless explicitely allowed
209 22 ▶ if ( $> == 0 and !$allow_cache_for_root ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($> == 0 and not $allow_cache_for_root) 0 22 22
Condition33%1/3
$> == 0 and not $allow_cache_for_root
!ll&&!rl&&r
2200
MC/DC0%0/2
$> == 0 and not $allow_cache_for_root
$> == 0 not $allow_cache_for_root
Truth table33%1/3
A and not(B)
A= $> == 0B= not $allow_cache_for_root
ABresult
0X0
100
111
210 0 $noCache = 1;
211 }
212  
213 # Use only cache to get conf if $local is set
214 22 ▶ if ( !$noCache
Branch: 1 branch
BranchTrueFalseTotal
if (not $noCache and $local and ref $self->{'refLocalStorage'} and $res = $self->{'refLocalStorage'}->get('conf')) { } 5 17 22
Condition88%8/9
not $noCache and $local and ref $self->{"refLocalStorage"} and $res = $self->{"refLocalStorage"}->get("conf")
!ll&&!rl&&r
1075
not $noCache and $local and ref $self->{"refLocalStorage"}
!ll&&!rl&&r
10012
not $noCache and $local
!ll&&!rl&&r
2812
MC/DC75%3/4
not $noCache and $local and ref $self->{"refLocalStorage"} and $res = $self->{"refLocalStorage"}->get("conf")
not $noCache $local ref $self->{"refLocalStorage"} $res = $self->{"refLocalStorage"}->get("conf")
Truth table80%4/5
not(A) and B and C and D
A= not $noCacheB= $localC= ref $self->{"refLocalStorage"}D= $res = $self->{"refLocalStorage"}->get("conf")
ABCDresult
0XXX0
10XX0
110X0
11100
11111
215 and $local
216 and ref( $self->{refLocalStorage} )
217 and $res = $self->{refLocalStorage}->get('conf') )
218 {
219 5 $msg .= "Get configuration from cache without verification.\n";
220 }
221  
222 # Check cfgNum in conf backend
223 # Get conf in backend only if a newer configuration is available
224 else {
225 17 ▶ $cfgNum ||= $self->lastCfg( { noCache => $noCache } );
Condition100%3/3
$cfgNum ||= $self->lastCfg({"noCache", $noCache})
l!l&&r!l&&!r
3131
MC/DC100%2/2
$cfgNum ||= $self->lastCfg({"noCache", $noCache})
$cfgNum $self->lastCfg({"noCache", $noCache})
Truth table100%3/3
A ||= B
A= $cfgNumB= $self->lastCfg({"noCache", $noCache})
ABresult
1X1
011
000
226 17 ▶ unless ($cfgNum) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($cfgNum) 1 16 17
227 1 $msg .= "Error: No configuration available in backend.\n";
228 }
229 17 my $r;
230 17 ▶ unless ( ref( $self->{refLocalStorage} ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $self->{'refLocalStorage'}) { } 14 3 17
231 3 $msg .= "Get remote configuration (localStorage unavailable).\n";
232 3 $r = $self->getDBConf( { cfgNum => $cfgNum } );
233 3 ▶ return undef unless ( $r->{cfgNum} );
Branch: 1 branch
BranchTrueFalseTotal
unless $r->{"cfgNum"} 0 3 3
234 3 $self->setDefault( $r, $localPrm );
235 3 $self->setValuesFromEnv($r);
236 3 $self->compactConf($r);
237 }
238 else {
239 14 ▶ eval { $r = $self->{refLocalStorage}->get('conf') }
Branch: 1 branch
BranchTrueFalseTotal
unless $noCache 12 2 14
240 if ( !$noCache );
241 14 ▶ $msg .= "Warn: $@" if ($@);
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 14 14
242  
243 14 ▶ if ( ref($r)
Branch: 1 branch
BranchTrueFalseTotal
if (ref $r and $r->{'cfgNum'} and $cfgNum and $r->{'cfgNum'} == $cfgNum) { } 1 13 14
Condition77%7/9
ref $r and $r->{"cfgNum"} and $cfgNum and $r->{"cfgNum"} == $cfgNum
!ll&&!rl&&r
941
ref $r and $r->{"cfgNum"} and $cfgNum
!ll&&!rl&&r
905
ref $r and $r->{"cfgNum"}
!ll&&!rl&&r
905
MC/DC50%2/4
ref $r and $r->{"cfgNum"} and $cfgNum and $r->{"cfgNum"} == $cfgNum
ref $r $r->{"cfgNum"} $cfgNum $r->{"cfgNum"} == $cfgNum
Truth table60%3/5
A and B and C and D
A= ref $rB= $r->{"cfgNum"}C= $cfgNumD= $r->{"cfgNum"} == $cfgNum
ABCDresult
0XXX0
10XX0
110X0
11100
11111
244 and $r->{cfgNum}
245 and $cfgNum
246 and $r->{cfgNum} == $cfgNum )
247 {
248 1 $msg .=
249 "Configuration unchanged, get configuration from cache.\n";
250 }
251 else {
252 13 my $r2 = $self->getDBConf( { cfgNum => $cfgNum } );
253 13 ▶ unless ( $r2->{cfgNum} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($r2->{'cfgNum'}) { } 12 1 13
254 1 ▶ $r = $self->{refLocalStorage}->get('conf') unless ($r);
Branch: 1 branch
BranchTrueFalseTotal
unless $r 1 0 1
255 1 ▶ $msg .=
Branch: 1 branch
BranchTrueFalseTotal
$r ? : 1 0 1
256 $r
257 ? "Error: Using previous cached configuration\n"
258 : "Error: No configuration found in local cache\n";
259 1 ▶ return undef unless ($r);
Branch: 1 branch
BranchTrueFalseTotal
unless $r 0 1 1
260 }
261 else {
262 12 $r = $r2;
263 }
264  
265 # Store configuration in cache
266 $self->setLocalConf($r)
267 if ( $self->{refLocalStorage}
268 13 ▶ and ( !$noCache or $noCache != 1 )
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"refLocalStorage"} and !$noCache || $noCache != 1 and not $raw 12 1 13
Condition77%7/9
$self->{"refLocalStorage"} and !$noCache || $noCache != 1 and not $raw
!ll&&!rl&&r
1012
$self->{"refLocalStorage"} and !$noCache || $noCache != 1
!ll&&!rl&&r
0112
not $noCache or $noCache != 1
l!l&&r!l&&!r
1111
MC/DC50%2/4
$self->{"refLocalStorage"} and !$noCache || $noCache != 1 and not $raw
$self->{"refLocalStorage"} not $noCache $noCache != 1 not $raw
Truth table50%3/6
A and not(B) or C and not(D)
A= $self->{"refLocalStorage"}B= not $noCacheC= $noCache != 1D= not $raw
ABCDresult
0XXX0
100X0
11X00
10100
11X11
10111
269 and !$raw );
270 }
271 }
272  
273 # Return configuration hash
274 17 $res = $r;
275 }
276  
277 22 $self->setDefault( $res, $localPrm );
278 22 $self->setValuesFromEnv($res);
279 22 $self->compactConf($res);
280  
281 # Create cipher object and replace variable placeholder
282 22 ▶ unless ($raw) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($raw) 21 1 22
283  
284 21 $self->replacePlaceholders($res);
285 21 eval {
286 21 $res->{cipher} = Lemonldap::NG::Common::Crypto->new( $res->{key} );
287 };
288 21 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 21 21
289 0 $msg .= "Bad key: $@. \n";
290 }
291 }
292  
293 22 return $res;
294 }
295  
296 ## @method hashRef setDefault(hashRef conf, hashRef localPrm)
297 # Set default params
298 # @param $conf Lemonldap::NG configuration hashRef
299 # @param $localPrm Local parameters
300 # @return conf
301 25 ▶sub setDefault {
Subroutine setDefault: called CC=8 SCAR=20.9
Pod undocumented
302 25 my ( $self, $conf, $localPrm ) = @_;
303 25 ▶ if ( defined $localPrm ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $localPrm) { } 1 24 25
304 1 $self->{localPrm} = $localPrm;
305 }
306 else {
307 24 $localPrm = $self->{localPrm};
308 }
309 25 my $defaultValues =
310 Lemonldap::NG::Common::Conf::DefaultValues->defaultValues();
311 25 ▶ if ( $localPrm and %$localPrm ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($localPrm and %$localPrm) 3 22 25
Condition66%2/3
$localPrm and %$localPrm
!ll&&!rl&&r
2203
MC/DC50%1/2
$localPrm and %$localPrm
$localPrm %$localPrm
Truth table66%2/3
A and B
A= $localPrmB= %$localPrm
ABresult
0X0
100
111
312 3 foreach my $k ( keys %$localPrm ) {
313 3 $conf->{$k} = $localPrm->{$k};
314 }
315 }
316 25 foreach my $k ( keys %$defaultValues ) {
317 9675 ▶ $conf->{$k} //= $defaultValues->{$k};
Condition66%2/3
$conf->{$k} //= $defaultValues->{$k}
l!l&&r!l&&!r
116185140
MC/DC0%0/2
$conf->{$k} //= $defaultValues->{$k}
$conf->{$k} $defaultValues->{$k}
Truth table66%2/3
A //= B
A= $conf->{$k}B= $defaultValues->{$k}
ABresult
1X1
011
000
318 }
319  
320 # Some parameters expect key name (example), not variable ($example)
321 25 ▶ if ( defined $conf->{whatToTrace} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $conf->{"whatToTrace"}) 25 0 25
322 25 $conf->{whatToTrace} =~ s/^\$//;
323 }
324  
325 25 return $conf;
326 }
327  
328 25 ▶sub setValuesFromEnv {
Subroutine setValuesFromEnv: called CC=2 SCAR=7.1
Pod undocumented
329 25 my ( $self, $conf ) = @_;
330 $conf->{hashedSessionStore} = $ENV{LLNG_HASHED_SESSION_STORE}
331 25 ▶ if $ENV{LLNG_HASHED_SESSION_STORE};
Branch: 1 branch
BranchTrueFalseTotal
if $ENV{"LLNG_HASHED_SESSION_STORE"} 0 25 25
332 25 return $conf;
333 }
334  
335 ## @method hashRef getLocalConf(string section, string file, int loaddefault)
336 # Get configuration from local file
337 #
338 # @param $section Optional section name (default DEFAULTSECTION)
339 # @param $file Optional file name (default DEFAULTCONFFILE)
340 # @param $loaddefault Optional load default section parameters (default 1)
341 # @return Lemonldap::NG configuration
342 15 ▶sub getLocalConf {
Subroutine getLocalConf: called CC=27 SCAR=44.6
Pod undocumented
343 15 my ( $self, $section, $file, $loaddefault ) = @_;
344 15 my $r = {};
345  
346 15 ▶ $section ||= DEFAULTSECTION;
Condition100%2/2
$section ||= "all"
l!l
123
MC/DC100%1/1
$section ||= "all"
$section
Truth table100%2/2
A
A= $section
Aresult
11
00
347 $file ||=
348 $self->{confFile}
349 || $ENV{LLNG_DEFAULTCONFFILE}
350 15 ▶ || DEFAULTCONFFILE;
Condition50%4/8
$file ||= $self->{"confFile"} || $ENV{"LLNG_DEFAULTCONFFILE"} || "/usr/local/lemonldap-ng/etc/lemonldap-ng.ini"
l!l&&r!l&&!r
1230
$self->{'confFile'} || $ENV{'LLNG_DEFAULTCONFFILE'} || '/usr/local/lemonldap-ng/etc/lemonldap-ng.ini'
l!l
30
$self->{"confFile"} or $ENV{"LLNG_DEFAULTCONFFILE"}
l!l&&r!l&&!r
300
MC/DC0%0/3
$file ||= $self->{"confFile"} || $ENV{"LLNG_DEFAULTCONFFILE"} || "/usr/local/lemonldap-ng/etc/lemonldap-ng.ini"
$file $self->{"confFile"} $ENV{"LLNG_DEFAULTCONFFILE"}
Truth table0%0/4
A ||= B or C
A= $fileB= $self->{"confFile"}C= $ENV{"LLNG_DEFAULTCONFFILE"}
ABCresult
1XX1
01X1
0011
0000
351 15 ▶ $loaddefault = 1 unless ( defined $loaddefault );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $loaddefault 3 12 15
352 15 my $cfg;
353  
354 # First, search if this file has been parsed
355 15 ▶ unless ( $cfg = $iniObj->{$file} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($cfg = $Lemonldap::NG::Common::Conf::iniObj->{$file}) 15 0 15
356  
357 # If default configuration cannot be read
358 # - Error if configuration section is requested
359 # - Silent exit for other section requests
360 15 ▶ if ( open( my $fh, '<', $file ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (open my $fh, '<', $file) { } 15 0 15
361  
362 # Parse ini file
363 15 $cfg = Config::IniFiles->new( -file => $fh, -allowcontinue => 1 );
364 15 close($fh);
365 }
366 else {
367 0 ▶ if ( $section eq CONFSECTION ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($section eq "configuration") 0 0 0
368 0 $msg .=
369 "Cannot read $file to get configuration access parameters: $!\n";
370 0 return $r;
371 }
372 0 return $r;
373 }
374  
375 15 ▶ unless ( defined $cfg ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $cfg) 0 15 15
376 0 $msg .= "Local config error: "
377 . ( join "\n", @Config::IniFiles::errors ) . "\n";
378 0 return $r;
379 }
380  
381 # Check if default section exists
382 15 ▶ unless ( $cfg->SectionExists(DEFAULTSECTION) ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($cfg->SectionExists("all")) 0 15 15
383 0 $msg .= "Default section (" . DEFAULTSECTION . ") is missing. \n";
384 0 return $r;
385 }
386  
387 # Check if configuration section exists
388 15 ▶ if ( $section eq CONFSECTION and !$cfg->SectionExists(CONFSECTION) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($section eq "configuration" and not $cfg->SectionExists("configuration")) 0 15 15
Condition66%2/3
$section eq "configuration" and not $cfg->SectionExists("configuration")
!ll&&!rl&&r
3120
MC/DC0%0/2
$section eq "configuration" and not $cfg->SectionExists("configuration")
$section eq "configuration" not $cfg->SectionExists("configuration")
Truth table66%2/3
A and not(B)
A= $section eq "configuration"B= not $cfg->SectionExists("configuration")
ABresult
0X0
100
111
389 0 $msg .= "Configuration section (" . CONFSECTION . ") is missing.\n";
390 0 return $r;
391 }
392 }
393  
394 # First load all default section parameters
395 15 ▶ if ($loaddefault) {
Branch: 1 branch
BranchTrueFalseTotal
if ($loaddefault) 3 12 15
396 3 foreach ( $cfg->Parameters(DEFAULTSECTION) ) {
397 15 $r->{$_} = $cfg->val( DEFAULTSECTION, $_ );
398 15 ▶ if ( $_ eq "require" ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_ eq "require") 0 15 15
399  
400 0 foreach my $require ( split /[,\s]+/, $r->{$_} ) {
401 0 eval { require $require };
402 0 ▶ $msg .= "Error: $@" if ($@);
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
403 }
404 }
405 15 ▶ if ( $r->{$_} =~ /^[{\[].*[}\]]$/
Branch: 1 branch
BranchTrueFalseTotal
if ($r->{$_} =~ /^[{\[].*[}\]]$/ or $r->{$_} =~ /^sub\s*{.*}$/) 0 15 15
Condition33%1/3
$r->{$_} =~ /^[{\[].*[}\]]$/ or $r->{$_} =~ /^sub\s*{.*}$/
l!l&&r!l&&!r
0015
MC/DC0%0/2
$r->{$_} =~ /^[{\[].*[}\]]$/ or $r->{$_} =~ /^sub\s*{.*}$/
$r->{$_} =~ /^[{\[].*[}\]]$/ $r->{$_} =~ /^sub\s*{.*}$/
Truth table33%1/3
A or B
A= $r->{$_} =~ /^[{\[].*[}\]]$/B= $r->{$_} =~ /^sub\s*{.*}$/
ABresult
1X1
011
000
406 || $r->{$_} =~ /^sub\s*{.*}$/ )
407 {
408 0 eval "\$r->{$_} = $r->{$_}";
409 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
410 0 $msg .= "Warn: error in file $file: $@.\n";
411 0 return $r;
412 }
413 }
414 }
415 }
416  
417 # If we have an additional section to load
418 15 ▶ if ( $section ne DEFAULTSECTION and $cfg->SectionExists($section) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($section ne "all" and $cfg->SectionExists($section)) 12 3 15
Condition66%2/3
$section ne "all" and $cfg->SectionExists($section)
!ll&&!rl&&r
3012
MC/DC50%1/2
$section ne "all" and $cfg->SectionExists($section)
$section ne "all" $cfg->SectionExists($section)
Truth table66%2/3
A and B
A= $section ne "all"B= $cfg->SectionExists($section)
ABresult
0X0
100
111
419  
420 # Check if requested section exists
421 # Load section parameters
422 12 foreach ( $cfg->Parameters($section) ) {
423 36 $r->{$_} = $cfg->val( $section, $_ );
424  
425 # Remove spaces before and after value (#1488)
426 36 $r->{$_} =~ s/^\s*(.+?)\s*/$1/;
427 36 ▶ if ( $r->{$_} =~ /^[{\[].*[}\]]$/ || $r->{$_} =~ /^sub\s*{.*}$/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($r->{$_} =~ /^[{\[].*[}\]]$/ or $r->{$_} =~ /^sub\s*{.*}$/) 9 27 36
Condition66%2/3
$r->{$_} =~ /^[{\[].*[}\]]$/ or $r->{$_} =~ /^sub\s*{.*}$/
l!l&&r!l&&!r
9027
MC/DC50%1/2
$r->{$_} =~ /^[{\[].*[}\]]$/ or $r->{$_} =~ /^sub\s*{.*}$/
$r->{$_} =~ /^[{\[].*[}\]]$/ $r->{$_} =~ /^sub\s*{.*}$/
Truth table66%2/3
A or B
A= $r->{$_} =~ /^[{\[].*[}\]]$/B= $r->{$_} =~ /^sub\s*{.*}$/
ABresult
1X1
011
000
428 9 eval "\$r->{$_} = $r->{$_}";
429 9 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 9 9
430 0 $msg .= "Warn: error in file $file: $@.\n";
431 0 return $r;
432 }
433 }
434 }
435 }
436  
437 15 $self->replacePlaceholders($r);
438 15 return $r;
439 }
440  
441 ## @method void setLocalConf(hashRef conf)
442 # Store $conf in the local cache.
443 # @param $conf Lemonldap::NG configuration hashRef
444 12 ▶sub setLocalConf {
Subroutine setLocalConf: called CC=2 SCAR=7.0
Pod undocumented
445 12 my ( $self, $conf ) = @_;
446 12 eval { $self->{refLocalStorage}->set( "conf", $conf ) };
447 12 ▶ $msg .= "Warn: $@\n" if ($@);
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 12 12
448 }
449  
450 ## @method hashRef getDBConf(hashRef args)
451 # Get configuration from remote storage system.
452 # @param $args hashRef that must contains a key "cfgNum" (number of the wanted
453 # configuration)
454 # @return Lemonldap::NG configuration hashRef
455 16 ▶sub getDBConf {
Subroutine getDBConf: called CC=6 SCAR=20.2
Pod undocumented
456 16 my ( $self, $args ) = @_;
457 16 my $cfgNum = $args->{cfgNum};
458 16 ▶ return undef unless $cfgNum;
Branch: 1 branch
BranchTrueFalseTotal
unless $cfgNum 1 15 16
459  
460 15 ▶ if ( $cfgNum < 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($cfgNum < 0) 0 15 15
461 0 my @a = $self->available();
462 0 ▶ $cfgNum =
Branch: 1 branch
BranchTrueFalseTotal
@a + $cfgNum > 0 ? : 0 0 0
463 ( @a + $cfgNum > 0 )
464 ? ( $a[ $#a + $cfgNum ] )
465 : $a[0];
466 }
467 15 my $conf = $self->load($cfgNum);
468 15 ▶ return undef if $conf == "-1";
Branch: 1 branch
BranchTrueFalseTotal
if $conf == -1 0 15 15
469 $msg .= "Get configuration $conf->{cfgNum}.\n"
470 15 ▶ if ( defined $conf->{cfgNum} );
Branch: 1 branch
BranchTrueFalseTotal
if defined $conf->{"cfgNum"} 15 0 15
471 15 return $conf;
472 }
473  
474 118 ▶sub _launch {
Subroutine _launch: called CC=5 SCAR=16.2
475 118 my $self = shift;
476 118 my $sub = shift;
477 118 my @res;
478 118 eval {
479 0 ▶ local $SIG{ALRM} = sub { die "TIMEOUT\n" };
Subroutine __ANON__: not called CC=1 SCAR=1.2
480 118 eval {
481 118 ▶ alarm( $self->{confTimeout} || 10 );
Condition50%1/2
$self->{'confTimeout'} || 10
l!l
0118
MC/DC0%0/1
$self->{'confTimeout'} || 10
$self->{'confTimeout'}
Truth table50%1/2
A
A= $self->{'confTimeout'}
Aresult
11
00
482 118 @res = &{ $self->{type} . "::$sub" }( $self, @_ );
483 };
484 118 alarm 0;
485 118 ▶ die $@ if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 14 104 118
486 };
487 118 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 14 104 118
488 14 $msg .= $@;
489 14 print STDERR "MSG $msg\n";
490 14 return undef;
491 }
492 104 ▶ return wantarray ? (@res) : $res[0];
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 104 104
493 }
494  
495 ## @method boolean prereq()
496 # Call prereq() from the $self->{type} package.
497 # @return True if succeed
498 27 ▶sub prereq {
Subroutine prereq: called CC=1 SCAR=0.0
Pod undocumented
499 27 return shift->_launch( 'prereq', @_ );
500 }
501  
502 ## @method @ available()
503 # Call available() from the $self->{type} package.
504 # @return list of available configuration numbers
505 0 ▶sub available {
Subroutine available: not called CC=1 SCAR=6.9
Pod undocumented
506 0 return shift->_launch( 'available', @_ );
507 }
508  
509 ## @method int lastCfg(hashRef args)
510 # Call lastCfg() from the $self->{type} package.
511 #
512 # When the backend call fails (returns undef/0) and a populated localStorage
513 # is available, returns the cfgNum of the cached configuration except if
514 # noCache is set.
515 #
516 # @param $args Optional hashRef, recognized keys: noCache
517 # @return Number of the last configuration available, 0 on failure
518 33 ▶sub lastCfg {
Subroutine lastCfg: called CC=8 SCAR=21.0
Pod undocumented
519 33 my ( $self, $args ) = @_;
520 33 ▶ $args ||= {};
Condition100%2/2
$args ||= {}
l!l
1518
MC/DC100%1/1
$args ||= {}
$args
Truth table100%2/2
A
A= $args
Aresult
11
00
521 33 my $r = $self->_launch('lastCfg');
522 33 ▶ return $r if $r;
Branch: 1 branch
BranchTrueFalseTotal
if $r 20 13 33
523  
524 13 ▶ if ( !$args->{noCache} and ref( $self->{refLocalStorage} ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $args->{"noCache"} and ref $self->{"refLocalStorage"}) 1 12 13
Condition100%3/3
not $args->{"noCache"} and ref $self->{"refLocalStorage"}
!ll&&!rl&&r
2101
MC/DC100%2/2
not $args->{"noCache"} and ref $self->{"refLocalStorage"}
not $args->{"noCache"} ref $self->{"refLocalStorage"}
Truth table100%3/3
not(A) and B
A= not $args->{"noCache"}B= ref $self->{"refLocalStorage"}
ABresult
0X0
100
111
525 1 my $cached;
526 1 eval { $cached = $self->{refLocalStorage}->get('conf') };
527 1 ▶ $msg .= "Warn: $@\n" if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 1 1
528 1 ▶ if ( ref($cached) and $cached->{cfgNum} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $cached and $cached->{"cfgNum"}) 1 0 1
Condition33%1/3
ref $cached and $cached->{"cfgNum"}
!ll&&!rl&&r
001
MC/DC0%0/2
ref $cached and $cached->{"cfgNum"}
ref $cached $cached->{"cfgNum"}
Truth table33%1/3
A and B
A= ref $cachedB= $cached->{"cfgNum"}
ABresult
0X0
100
111
529 1 $msg .=
530 "lastCfg failed, falling back to cached configuration "
531 . "(cfgNum=$cached->{cfgNum}).\n";
532 1 return $cached->{cfgNum};
533 }
534 }
535 12 return 0;
536 }
537  
538 ## @method boolean lock()
539 # Call lock() from the $self->{type} package.
540 # @return True if succeed
541 0 ▶sub lock {
Subroutine lock: not called CC=1 SCAR=6.9
Pod undocumented
542 0 return shift->_launch( 'lock', @_ );
543 }
544  
545 ## @method boolean isLocked()
546 # Call isLocked() from the $self->{type} package.
547 # @return True if database is locked
548 0 ▶sub isLocked {
Subroutine isLocked: not called CC=1 SCAR=6.9
Pod undocumented
549 0 return shift->_launch( 'isLocked', @_ );
550 }
551  
552 ## @method boolean unlock()
553 # Call unlock() from the $self->{type} package.
554 # @return True if succeed
555 0 ▶sub unlock {
Subroutine unlock: not called CC=1 SCAR=6.9
Pod undocumented
556 0 return shift->_launch( 'unlock', @_ );
557 }
558  
559 ## @method int store(hashRef conf)
560 # Call store() from the $self->{type} package.
561 # @param $conf Lemondlap configuration serialized
562 # @return Number of new configuration stored if succeed, 0 else.
563 25 ▶sub store {
Subroutine store: called CC=1 SCAR=0.0
Pod undocumented
564 25 return shift->_launch( 'store', @_ );
565 }
566  
567 ## @method load(int cfgNum, arrayRef fields)
568 # Call load() from the $self->{type} package.
569 # @return Lemonldap::NG Configuration hashRef if succeed, 0 else.
570 33 ▶sub load {
Subroutine load: called CC=1 SCAR=0.0
Pod undocumented
571 33 return shift->_launch( 'load', @_ );
572 }
573  
574 ## @method boolean delete(int cfgNum)
575 # Call delete() from the $self->{type} package.
576 # @param $cfgNum Number of configuration to delete
577 # @return True if succeed
578 0 ▶sub delete {
Subroutine delete: not called CC=2 SCAR=17.9
Pod undocumented
579 0 my ( $self, $c ) = @_;
580 0 my @a = $self->available();
581 0 ▶ if ( grep( /^$c$/, @a ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep /^$c$/, @a) { } 0 0 0
582 0 return $self->_launch( 'delete', $c );
583 }
584 else {
585 0 return 0;
586 }
587 }
588  
589 0 ▶sub logError {
Subroutine logError: not called CC=1 SCAR=6.9
Pod undocumented
590 0 return shift->_launch( 'logError', @_ );
591 }
592  
593 16080 ▶sub _substPlaceHolders {
Subroutine _substPlaceHolders: called CC=3 SCAR=11.0
594 16080 my ( $self, $string, $placeholder_config ) = @_;
595 16080 ▶ return $string unless $string;
Branch: 1 branch
BranchTrueFalseTotal
unless $string 0 16080 16080
596  
597 16080 ▶ while ( my ( $key, $value ) = each %$placeholder_config ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %$placeholder_config) 817 16080 16897
598 817 $string =~ s/%\Q$key\E:(.*?)%/$value->($1)/ge;
599 }
600 16080 return $string;
601 }
602  
603 ## @method void replacePlaceholders(res: LLNG_Conf)
604 #
605 # Recursively replace %SERVERENV:VariableName% by $ENV{VariableName} value
606 47 ▶sub replacePlaceholders {
Subroutine replacePlaceholders: called CC=5 SCAR=16.1
Pod undocumented
607 47 my ( $self, $conf ) = @_;
608  
609 47 my $placeholder_config = {};
610 47 ▶ if ( $self->{useServerEnv} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"useServerEnv"}) 6 41 47
611 6 ▶ $placeholder_config->{SERVERENV} = sub { $ENV{ $_[0] } };
Subroutine __ANON__: called CC=1 SCAR=0.0
612 }
613 47 ▶ if ( my $moduleList = $self->{configPlaceHolderModules} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $moduleList = $self->{"configPlaceHolderModules"}) 2 45 47
614 2 for my $moduledef ( split( /[,\s]+/, $moduleList ) ) {
615 2 ▶ if ( my ( $prefix, $module ) =
Branch: 1 branch
BranchTrueFalseTotal
if (() = $moduledef =~ /(\w+)\s*=\s*([\w:]+)/) 2 0 2
616 $moduledef =~ /(\w+)\s*=\s*([\w:]+)/ )
617 {
618 2 eval "require $module";
619 $placeholder_config->{$prefix} =
620 2 ▶ sub { $module->replace( $self, $_[0] ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
621 }
622 }
623 }
624  
625 47 return $self->_replacePlaceholder_recurse( $conf, $placeholder_config );
626 }
627  
628 677 ▶sub _replacePlaceholder_recurse {
Subroutine _replacePlaceholder_recurse: called CC=9 SCAR=22.1
629 677 my ( $self, $conf, $placeholder_config ) = @_;
630 677 ▶ if ( ref $conf eq 'HASH' ) {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $conf eq 'HASH') { } 654 23 677
elsif (ref $conf eq 'ARRAY') { } 23 0 23
631 654 foreach my $oldkey ( keys %$conf ) {
632 9004 my $key = $self->_substPlaceHolders( $oldkey, $placeholder_config );
633 9004 ▶ if ( $key ne $oldkey ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($key ne $oldkey) 1 9003 9004
634 1 $conf->{$key} = delete $conf->{$oldkey};
635 }
636 9004 ▶ next unless ( $conf->{$key} );
Branch: 1 branch
BranchTrueFalseTotal
unless $conf->{$key} 1386 7618 9004
637 7618 ▶ if ( ref $conf->{$key} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $conf->{$key}) { } 630 6988 7618
638 630 $self->_replacePlaceholder_recurse( $conf->{$key},
639 $placeholder_config );
640 }
641 else {
642 6988 $conf->{$key} = $self->_substPlaceHolders( $conf->{$key},
643 $placeholder_config );
644 }
645 }
646 }
647 elsif ( ref $conf eq 'ARRAY' ) {
648 23 ▶ for ( my $i = 0 ; $i < @$conf ; $i++ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i < @$conf) 88 23 111
649 88 ▶ if ( ref $conf->[$i] ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $conf->[$i]) { } 0 88 88
650 0 $self->_replacePlaceholder_recurse( $conf->[$i],
651 $placeholder_config );
652 }
653 else {
654 88 $conf->[$i] =
655 $self->_substPlaceHolders( $conf->[$i], $placeholder_config );
656 }
657 }
658 }
659 }
660  
661 16 1;
662 __END__
« blib/lib/Lemonldap/NG/Common/Logger/Sentry.pm ↑ Summary blib/lib/Lemonldap/NG/Common/Notifications/JSON.pm »