Branch Coverage

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


line true false branch
290 0 9 unless (@_ < 3)
313 7 2 unless @_
316 0 2 unless (defined $options and UNIVERSAL::isa($options, 'HASH'))
322 2 2 if (my $opt_value = $$options{$opt_name})
323 1 1 if (UNIVERSAL::isa($opt_value, 'CODE')) { }
1 0 elsif (UNIVERSAL::isa($opt_value, 'ARRAY')) { }
326 1 0 if (@$opt_value and UNIVERSAL::isa($$opt_value[0], 'CODE')) { }
357 0 17 unless (@_ == 1)
379 0 13 unless (@_ == 5)
390 2 11 if (path_has_apache_style_glob($path)) { }
399 0 2 unless (defined $separator and length $separator)
405 0 2 if (path_has_apache_style_glob($dirname))
410 0 2 unless (path_has_apache_style_glob($basename))
416 1 1 unless (opendir DIR, $dirname)
425 1 0 if ($$self{'_include_file_ignore_missing_file'}) { }
437 1 2 if $n eq '.'
438 1 1 if $n eq '..'
439 1 0 if (fnmatch $basename, $n)
443 0 1 unless (closedir DIR)
455 5 7 unless (@stat)
463 5 0 if ($$self{'_include_file_ignore_missing_file'}) { }
471 7 0 if (-d _ or -f _) { }
472 0 7 unless ($self->parse_file($p))
502 0 22 unless (@_ == 2)
509 1 21 unless (@stat)
515 4 17 if (-d _)
516 0 4 unless (opendir DIR, $file_or_dir_name)
521 0 4 unless (closedir DIR)
532 4 0 if ($ok) { }
541 0 17 unless (open $fd, $file_or_dir_name)
578 573 4683 unless length $_
585 66 4617 if (s/(\\)?\\\r?\n$//) { }
586 7 59 if ($1) { }
591 16 43 unless (length $continued_line)
604 16 4608 if (length $continued_line) { }
615 3219 1405 if (substr($_, 0, 1) eq '#')
620 0 1405 unless length $_
623 180 1225 if (my($context) = $_ =~ m[^<\s*/\s*([^\s>]+)\s*>\s*$])
627 0 180 unless (defined $mother)
636 0 180 unless ($start_context_name eq $context)
655 180 1045 if (my($context, $value) = $_ =~ /^<\s*(\S+)\s+(.*)>\s*$/)
684 4 1041 unless (defined $value and length $value)
696 261 780 if (defined $value_path_index and $value_path_index =~ /^-?\d+$/)
697 1 260 if (substr($value_path_index, 0, 1) eq '-') { }
707 258 5 if ($new_node->value_is_path($i))
709 0 258 if (my $pre_transform_path_sub = $$self{'pre_transform_path_sub'})
712 0 0 if (defined $new_path and length $new_path) { }
725 199 59 if (defined $server_root and length $server_root and $new_node->value_is_rel_path)
733 48 210 if (my $post_transform_path_sub = $$self{'post_transform_path_sub'})
736 48 0 if (defined $new_path and length $new_path) { }
754 5 1036 if ($directive eq 'serverroot' and not $$self{'current_node'}->mother)
761 10 1023 if ($directive eq 'accessconfig' or $directive eq 'include' or $directive eq 'resourceconfig')
764 0 13 unless ($new_node->value_is_path)
767 0 13 unless ($self->_handle_include_directive($file_or_dir_name, $line_number, $directive, $values[0]))
778 0 17 unless (close $fd)
837 0 8 unless (@_ > 1)
845 0 8 if (@_ and $_[0] and ref $_[0]) { }
851 0 8 unless @_
858 130 1103 if $names{$node->name}
889 0 16 unless (@_ > 1)
897 7 9 if (@_ and $_[0] and ref $_[0]) { }
903 0 16 unless @_
908 9 7 if ($start == $$self{'root'}) { }
914 2 14 unless @siblings
951 0 0 unless (@_ > 1)
959 0 0 unless @_
985 0 1 unless (@_ == 1)
1010 18093 8 if (defined $depth) { }
1018 10699 7402 unless (ref $object)
1019 10675 24 if (defined $object) { }
1026 1233 6169 if (my $r = $$seen_ref{$object})
1039 0 6169 if (UNIVERSAL::isa($object, 'SCALAR')) { }
3693 2476 elsif (UNIVERSAL::isa($object, 'ARRAY')) { }
2474 2 elsif (UNIVERSAL::isa($object, 'HASH')) { }
2 0 elsif (UNIVERSAL::isa($object, 'CODE')) { }