Branch Coverage

blib/lib/EMDIS/ECS/Config.pm
Criterion Covered Total %
branch 103 138 74.6


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})
237 28 11 if exists $this->{$attr} and not $this->{$attr} eq "" and not file_name_is_absolute($this->{$attr})
245 14 0 if exists $this->{$attr} and not file_name_is_absolute($this->{$attr})
250 6 1 if (not defined $this->{'ECS_TO_DIR'} or $this->{'ECS_TO_DIR'} eq '') { }
276 498 167 if (exists $this->{$attr})
285 6 1 unless (defined $this->{'SMTP_PORT'})
287 1 5 if is_yes($this->{'SMTP_USE_SSL'})
288 1 5 if is_yes($this->{'SMTP_USE_STARTTLS'})
292 6 1 unless (defined $this->{'INBOX_PORT'})
295 4 2 if (/POP3/)
297 0 4 if is_yes($this->{'INBOX_USE_SSL'})
299 1 5 if (/IMAP/)
301 1 0 if is_yes($this->{'INBOX_USE_SSL'})
407 4 199 unless exists $this->{$attr}
413 7 0 unless ($this->{'INBOX_PROTOCOL'} =~ /DIRECTORY/i or exists $this->{'INBOX_OAUTH_TOKEN_CMD'})
418 2 12 unless exists $this->{$attr}
422 0 7 if (exists $this->{'INBOX_OAUTH_TOKEN_CMD'})
428 0 0 unless exists $this->{$attr}
432 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) { }
437 0 2 unless defined $this->{'INBOX_FOLDER'}
448 0 0 unless defined $this->{'INBOX_DIRECTORY'}
460 0 7 if (exists $this->{'SMTP_OAUTH_TOKEN_CMD'})
466 0 0 unless exists $this->{$attr}
470 0 7 if (is_yes($this->{'ENABLE_AMQP'}))
480 0 0 unless exists $this->{$attr}
485 1 0 unless (exists $this->{'GPG_HOMEDIR'} or exists $this->{'PGP_HOMEDIR'})
492 6 1 if (exists $this->{'GPG_HOMEDIR'})
500 2 28 unless exists $this->{$attr}
505 3 4 if (exists $this->{'PGP_HOMEDIR'})
513 2 13 unless exists $this->{$attr}
518 1 6 if ($this->{'T_CHK'} <= 0)
525 1 6 if ($this->{'T_SCN'} <= 0)
532 1 6 if ($this->{'T_ADM_REMIND'} <= 0)
540 1 6 if ($this->{'T_MSG_PROC'} <= 0)
550 5 30 if (exists $this->{$name} and not is_yes($this->{$name}) and not is_no($this->{$name}))
558 1 6 if (is_yes($this->{'INBOX_USE_SSL'}) and is_yes($this->{'INBOX_USE_STARTTLS'}))
565 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'}))
573 1 6 if (is_yes($this->{'SMTP_USE_SSL'}) and is_yes($this->{'SMTP_USE_STARTTLS'}))
580 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'}))
593 0 7 if $this->{'BCK_DIR'} ne "NONE"
596 6 1 if not defined $this->{'ECS_TO_DIR'} or $this->{'ECS_TO_DIR'} eq ""
597 0 7 if is_yes($this->{'ENABLE_AMQP'})
600 8 75 if (exists $this->{$dir} and not -d $this->{$dir})
608 3 4 if ($#errors >= 0)