Branch Coverage

blib/lib/Log/Facile.pm
Criterion Covered Total %
branch 55 68 80.8


line true false branch
44 13 483 if (_is_tmpl_accessor($key, $tmpl_key) == 1) { }
274 209 elsif (_is_tmpl_accessor($key, $tmpl_key) == 2) { }
208 0 elsif (_is_valid_accessor($key)) { }
71 4 23 if (_is_tmpl_accessor($key, $value_or_key) == 1) { }
2 21 elsif (_is_tmpl_accessor($key, $value_or_key) == 2) { }
0 21 elsif (_is_tmpl_accessor($key, $value_or_key) == 255) { }
20 0 elsif (_is_valid_accessor($key)) { }
101 746 481 if (defined $tmpl_key and $tmpl_key eq $TEMPLATE)
106 190 2682 if (defined $key and $each eq $key) { }
4 2678 elsif (defined $key and $each =~ /$key/ || $key =~ /$each/) { }
135 228 1138 if (defined $key and $key eq $each)
141 2 228 unless $enable
151 29 144 if (defined $key and _is_tmpl_accessor($TEMPLATE, $key) == 1 and defined $self->get($TEMPLATE)->{$key}) { }
48 96 elsif (defined $key and $key eq 'DATE' and not defined $self->get($TEMPLATE)->{'DATE'}) { }
212 0 24 unless open my $log, '>> ' . $self->get('log_file')
215 0 24 unless close $log
222 4 2 if ($self->get('debug_flag')) { }
224 1 3 defined $self->get('level_debug') ? :
239 1 7 defined $self->get('level_info') ? :
249 1 3 defined $self->get('level_error') ? :
259 1 3 defined $self->get('level_warn') ? :
269 1 3 defined $self->get('level_fatal') ? :
281 2 4 if (defined $swap_dir) { }
0 4 elsif (not defined $self->get('swap_dir')) { }
297 1 5 unless (-d $self->get('swap_dir'))
299 1 0 unless mkdir $self->get('swap_dir')
302 4 1 if (-f $self->get('log_file')) { }
304 0 4 unless rename $self->get('log_file'), $self->get('swap_dir') . '/' . $file_pref
313 0 4 unless opendir my $s_dir, $self->get('swap_dir')
320 2 4 if ($each =~ /\.(\d)$/) { }
322 0 2 unless rename $each, $rename_pref . ($1 + 1)
327 0 4 unless rename $each, $rename_pref . '1'
331 0 4 unless closedir $s_dir
351 48 0 defined $self->get('date_format') ? :