Branch Coverage

blib/lib/Apache/ConfigParser.pm
Criterion Covered Total %
branch 108 150 72.0


line true false branch
285 0 9 unless (@_ < 3)
308 7 2 unless @_
311 0 2 unless (defined $options and UNIVERSAL::isa($options, 'HASH'))
317 2 2 if (my $opt_value = $$options{$opt_name})
318 1 1 if (UNIVERSAL::isa($opt_value, 'CODE')) { }
1 0 elsif (UNIVERSAL::isa($opt_value, 'ARRAY')) { }
321 1 0 if (@$opt_value and UNIVERSAL::isa($$opt_value[0], 'CODE')) { }
352 0 19 unless (@_ == 1)
374 0 15 unless (@_ == 5)
385 2 13 if (path_has_apache_style_glob($path)) { }
394 0 2 unless (defined $separator and length $separator)
400 0 2 if (path_has_apache_style_glob($dirname))
405 0 2 unless (path_has_apache_style_glob($basename))
411 1 1 unless (opendir DIR, $dirname)
420 1 0 if ($$self{'_include_file_ignore_missing_file'}) { }
432 1 2 if $n eq '.'
433 1 1 if $n eq '..'
434 1 0 if (fnmatch $basename, $n)
438 0 1 unless (closedir DIR)
450 6 8 unless (@stat)
458 6 0 if ($$self{'_include_file_ignore_missing_file'}) { }
466 8 0 if (-d _ or -f _) { }
467 0 8 unless ($self->parse_file($p))
497 0 23 unless (@_ == 2)
504 1 22 unless (@stat)
510 4 18 if (-d _)
511 0 4 unless (opendir DIR, $file_or_dir_name)
516 0 4 unless (closedir DIR)
527 4 0 if ($ok) { }
536 0 18 unless (open $fd, $file_or_dir_name)
573 578 4700 unless length $_
580 72 4628 if (s/(\\)?\\\r?\n$//) { }
581 8 64 if ($1) { }
586 17 47 unless (length $continued_line)
599 17 4619 if (length $continued_line) { }
610 3223 1413 if (substr($_, 0, 1) eq '#')
615 0 1413 unless length $_
618 180 1233 if (my($context) = $_ =~ m[^<\s*/\s*([^\s>]+)\s*>\s*$])
622 0 180 unless (defined $mother)
631 0 180 unless ($start_context_name eq $context)
650 180 1053 if (my($context, $value) = $_ =~ /^<\s*(\S+)\s+(.*)>\s*$/)
679 4 1049 unless (defined $value and length $value)
691 263 786 if (defined $value_path_index and $value_path_index =~ /^-?\d+$/)
692 1 262 if (substr($value_path_index, 0, 1) eq '-') { }
702 260 5 if ($new_node->value_is_path($i))
704 0 260 if (my $pre_transform_path_sub = $$self{'pre_transform_path_sub'})
707 0 0 if (defined $new_path and length $new_path) { }
720 200 60 if (defined $server_root and length $server_root and $new_node->value_is_rel_path)
728 49 211 if (my $post_transform_path_sub = $$self{'post_transform_path_sub'})
731 49 0 if (defined $new_path and length $new_path) { }
749 5 1044 if ($directive eq 'serverroot' and not $$self{'current_node'}->mother)
757 5 1029 if ($directive eq 'accessconfig' or $directive eq 'include' or $directive eq 'includeoptional' or $directive eq 'resourceconfig')
761 0 15 unless ($new_node->value_is_path)
764 0 15 unless ($self->_handle_include_directive($file_or_dir_name, $line_number, $directive, $values[0]))
775 0 18 unless (close $fd)
834 0 8 unless (@_ > 1)
842 0 8 if (@_ and $_[0] and ref $_[0]) { }
848 0 8 unless @_
855 130 1111 if $names{$node->name}
886 0 16 unless (@_ > 1)
894 7 9 if (@_ and $_[0] and ref $_[0]) { }
900 0 16 unless @_
905 9 7 if ($start == $$self{'root'}) { }
911 2 14 unless @siblings
948 0 0 unless (@_ > 1)
956 0 0 unless @_
982 0 1 unless (@_ == 1)
1007 18269 8 if (defined $depth) { }
1015 10827 7450 unless (ref $object)
1016 10803 24 if (defined $object) { }
1023 1241 6209 if (my $r = $$seen_ref{$object})
1036 0 6209 if (UNIVERSAL::isa($object, 'SCALAR')) { }
3717 2492 elsif (UNIVERSAL::isa($object, 'ARRAY')) { }
2490 2 elsif (UNIVERSAL::isa($object, 'HASH')) { }
2 0 elsif (UNIVERSAL::isa($object, 'CODE')) { }