Branch Coverage

blib/lib/EMDIS/ECS/Config.pm
Criterion Covered Total %
branch 104 140 74.2


line true false branch
67 9 157 unless $attr =~ /[^A-Z]/
71 0 157 unless $EMDIS::ECS::Config::ok_attr{$attr}
84 9 1 unless defined $skip_val
87 0 10 unless defined $cfg_file
91 0 10 if $cfg_file eq ""
93 2 8 if $err
94 1 7 if $skip_val
96 0 7 if $err
98 3 4 if $err
112 0 0 if $attr =~ /PASSWORD|PASSPHRASE/i
126 1 9 unless (open CONFIG, "< $this->{'CFG_FILE'}")
135 8 200 unless length $_
136 38 162 if /^#/
141 0 486 if ($#fields >= 0 and $fields[$#fields] =~ /\\$/) { }
155 161 1 if ($EMDIS::ECS::Config::ok_attr{$attr}) { }
167 1 8 if ($err)
187 7 0 unless file_name_is_absolute($script_dir)
190 7 0 unless file_name_is_absolute($config_dir)
192 6 1 if (is_yes($this->{'ENABLE_ENV_CONFIG'}))
196 373 188 if (exists $this->{$attr})
200 2 371 if ($value =~ /^\$ENV\{(\S+)\}$/)
204 2 0 if (defined $env_value) { }
221 435 221 if (exists $this->{$attr})
235 0 56 if $attr eq "LOG_FILE" and $this->{$attr} eq "__STDOUT__"
240 28 11 if exists $this->{$attr} and not $this->{$attr} eq "" and not file_name_is_absolute($this->{$attr})
248 14 0 if exists $this->{$attr} and not file_name_is_absolute($this->{$attr})
253 6 1 if (not defined $this->{'ECS_TO_DIR'} or $this->{'ECS_TO_DIR'} eq '') { }
279 498 167 if (exists $this->{$attr})
288 6 1 unless (defined $this->{'SMTP_PORT'})
290 1 5 if is_yes($this->{'SMTP_USE_SSL'})
291 1 5 if is_yes($this->{'SMTP_USE_STARTTLS'})
295 6 1 unless (defined $this->{'INBOX_PORT'})
298 4 2 if (/POP3/)
300 0 4 if is_yes($this->{'INBOX_USE_SSL'})
302 1 5 if (/IMAP/)
304 1 0 if is_yes($this->{'INBOX_USE_SSL'})
410 4 199 unless exists $this->{$attr}
416 7 0 unless ($this->{'INBOX_PROTOCOL'} =~ /DIRECTORY/i or exists $this->{'INBOX_OAUTH_TOKEN_CMD'})
421 2 12 unless exists $this->{$attr}
425 0 7 if (exists $this->{'INBOX_OAUTH_TOKEN_CMD'})
431 0 0 unless exists $this->{$attr}
435 2 5 if ($this->{'INBOX_PROTOCOL'} =~ /IMAP/i) { }
4 1 elsif ($this->{'INBOX_PROTOCOL'} =~ /POP3/i) { }
0 1 elsif ($this->{'INBOX_PROTOCOL'} =~ /DIRECTORY/i) { }
0 1 elsif ($this->{'INBOX_PROTOCOL'} =~ /NONE/i) { }
440 0 2 unless defined $this->{'INBOX_FOLDER'}
451 0 0 unless defined $this->{'INBOX_DIRECTORY'}
463 0 7 if (exists $this->{'SMTP_OAUTH_TOKEN_CMD'})
469 0 0 unless exists $this->{$attr}
473 0 7 if (is_yes($this->{'ENABLE_AMQP'}))
483 0 0 unless exists $this->{$attr}
488 1 0 unless (exists $this->{'GPG_HOMEDIR'} or exists $this->{'PGP_HOMEDIR'})
495 6 1 if (exists $this->{'GPG_HOMEDIR'})
503 2 28 unless exists $this->{$attr}
508 3 4 if (exists $this->{'PGP_HOMEDIR'})
516 2 13 unless exists $this->{$attr}
521 1 6 if ($this->{'T_CHK'} <= 0)
528 1 6 if ($this->{'T_SCN'} <= 0)
535 1 6 if ($this->{'T_ADM_REMIND'} <= 0)
543 1 6 if ($this->{'T_MSG_PROC'} <= 0)
553 5 30 if (exists $this->{$name} and not is_yes($this->{$name}) and not is_no($this->{$name}))
561 1 6 if (is_yes($this->{'INBOX_USE_SSL'}) and is_yes($this->{'INBOX_USE_STARTTLS'}))
568 0 0 if (exists $this->{'INBOX_OAUTH_TOKEN_CMD'} and not is_yes($this->{'INBOX_USE_SSL'}) and not is_yes($this->{'INBOX_USE_STARTTLS'}))
576 1 6 if (is_yes($this->{'SMTP_USE_SSL'}) and is_yes($this->{'SMTP_USE_STARTTLS'}))
583 0 0 if (exists $this->{'SMTP_OAUTH_TOKEN_CMD'} and not is_yes($this->{'SMTP_USE_SSL'}) and not is_yes($this->{'SMTP_USE_STARTTLS'}))
596 0 7 if $this->{'BCK_DIR'} ne "NONE"
599 6 1 if not defined $this->{'ECS_TO_DIR'} or $this->{'ECS_TO_DIR'} eq ""
600 0 7 if is_yes($this->{'ENABLE_AMQP'})
603 8 75 if (exists $this->{$dir} and not -d $this->{$dir})
611 3 4 if ($#errors >= 0)