Branch Coverage

blib/lib/EMDIS/ECS/Config.pm
Criterion Covered Total %
branch 89 110 80.9


line true false branch
54 6 132 unless $attr =~ /[^A-Z]/
58 0 132 unless $EMDIS::ECS::Config::ok_attr{$attr}
71 7 0 unless defined $skip_val
74 0 7 unless defined $cfg_file
78 0 7 if $cfg_file eq ''
80 2 5 if $err
81 0 5 if $skip_val
83 0 5 if $err
85 3 2 if $err
99 0 0 if $attr =~ /PASSWORD|PASSPHRASE/i
113 1 6 unless (open CONFIG, "< $this->{'CFG_FILE'}")
122 6 145 unless length $_
123 28 117 if /^#/
128 0 351 if ($#fields >= 0 and $fields[$#fields] =~ /\\$/) { }
142 116 1 if ($EMDIS::ECS::Config::ok_attr{$attr}) { }
154 1 5 if ($err)
173 5 0 unless file_name_is_absolute($script_dir)
176 5 0 unless file_name_is_absolute($config_dir)
182 251 81 if (exists $this->{$attr})
198 20 9 if exists $this->{$attr} and not $this->{$attr} eq '' and not file_name_is_absolute($this->{$attr})
206 10 0 if exists $this->{$attr} and not file_name_is_absolute($this->{$attr})
211 4 1 if (not defined $this->{'ECS_TO_DIR'} or $this->{'ECS_TO_DIR'} eq '') { }
235 291 49 if (exists $this->{$attr})
244 4 1 unless (defined $this->{'SMTP_PORT'})
246 1 3 if is_yes($this->{'SMTP_USE_SSL'})
247 1 3 if is_yes($this->{'SMTP_USE_STARTTLS'})
251 4 1 unless (defined $this->{'INBOX_PORT'})
254 2 2 if (/POP3/)
256 0 2 if is_yes($this->{'INBOX_USE_SSL'})
258 1 3 if (/IMAP/)
260 1 0 if is_yes($this->{'INBOX_USE_SSL'})
351 4 141 unless exists $this->{$attr}
357 5 0 unless ($this->{'INBOX_PROTOCOL'} =~ /DIRECTORY/i)
362 2 8 unless exists $this->{$attr}
366 2 3 if ($this->{'INBOX_PROTOCOL'} =~ /IMAP/i) { }
2 1 elsif ($this->{'INBOX_PROTOCOL'} =~ /POP3/i) { }
0 1 elsif ($this->{'INBOX_PROTOCOL'} =~ /DIRECTORY/i) { }
371 0 2 unless defined $this->{'INBOX_FOLDER'}
382 0 0 unless defined $this->{'INBOX_DIRECTORY'}
391 1 0 unless (exists $this->{'GPG_HOMEDIR'} or exists $this->{'PGP_HOMEDIR'})
398 4 1 if (exists $this->{'GPG_HOMEDIR'})
406 2 18 unless exists $this->{$attr}
411 3 2 if (exists $this->{'PGP_HOMEDIR'})
419 2 13 unless exists $this->{$attr}
424 1 4 if ($this->{'T_CHK'} <= 0)
431 1 4 if ($this->{'T_SCN'} <= 0)
438 1 4 if ($this->{'T_ADM_REMIND'} <= 0)
446 1 4 if ($this->{'T_MSG_PROC'} <= 0)
456 5 20 if (exists $this->{$name} and not is_yes($this->{$name}) and not is_no($this->{$name}))
464 1 4 if (is_yes($this->{'INBOX_USE_SSL'}) and is_yes($this->{'INBOX_USE_STARTTLS'}))
471 1 4 if (is_yes($this->{'SMTP_USE_SSL'}) and is_yes($this->{'SMTP_USE_STARTTLS'}))
483 0 5 if $this->{'BCK_DIR'} ne 'NONE'
486 4 1 if not defined $this->{'ECS_TO_DIR'} or $this->{'ECS_TO_DIR'} eq ''
489 8 51 if (exists $this->{$dir} and not -d $this->{$dir})
497 3 2 if ($#errors >= 0)