Branch Coverage

blib/lib/Config/ApacheFormat.pm
Criterion Covered Total %
branch 114 158 72.1


line true false branch
367 0 0 unless $args{'duplicate_directives'} eq 'last' or $args{'duplicate_directives'} eq 'error' or $args{'duplicate_directives'} eq 'combine'
398 0 119 if (ref $file) { }
403 0 119 unless open $fh, '<', $file
424 2 2267 if ($$self{'valid_directives'})
425 0 5 $case_sensitive ? :
429 8 2261 if ($$self{'valid_blocks'})
430 0 20 $case_sensitive ? :
439 0 2269 if ($$self{'case_sensitive'}) { }
454 120 18473 if (eof $fh)
455 113 7 if @$fstack == 1
469 466 18017 if /^#/
475 1159 16855 unless length $line
478 2149 14706 if ($line =~ m[^</(\w+)>$]) { }
2151 12555 elsif ($line =~ /^<(\w+)\s*(.*)>$/) { }
12554 1 elsif ($line =~ /^(\w+)(?:\s+(.+))?$/) { }
481 2149 0 unless $case_sensitive
483 2 0 defined $block_name ? :
2 2147 unless defined $block_name and $block_name eq $name
496 2151 0 unless $case_sensitive
498 1 2150 unless not $validate_blocks or exists $valid_blocks{$name}
504 2043 107 if $values
512 2150 0 ref $val ? :
541 9 12545 unless defined $values
542 12554 0 unless $case_sensitive
544 1 12553 unless not $validate_directives or exists $valid_directives{$name}
554 0 12553 if $@
559 23 12530 if $$self{'expand_vars'}
561 0 12553 if $@
565 7 12546 if ($$self{'setenv_vars'})
566 1 6 if ($name =~ /^setenv$/i) { }
1 5 elsif ($name =~ /^unsetenv$/i) { }
567 0 1 if @val != 2
572 0 1 unless @val
581 6 12547 if ($name =~ /$include_re/)
585 0 7 $$self{'case_sensitive'} ? :
587 1 6 if (not 'File::Spec'->file_name_is_absolute($f) and exists $$data{$root})
596 1 6 if (-d $f) { }
597 0 1 unless opendir INCD, $f
609 4 5 unless (open $include_fh, '<', $values)
610 4 0 if ($$fstack[0]{'filename'}) { }
615 1 3 unless open $include_fh, '<', 'File::Spec'->catpath(@parts)
638 6 12541 if ($$self{'fix_booleans'})
640 3 3 if (/^true$/i or /^on$/i or /^yes$/i) { }
3 0 elsif (/^false$/i or /^off$/i or /^no$/i) { }
652 510 12037 if ($$self{'hash_directives'} and _member($orig, $$self{'hash_directives'}, $$self{'case_sensitive'})) { }
656 0 510 if ($$self{'duplicate_directives'} eq 'error') { }
510 0 elsif ($$self{'duplicate_directives'} eq 'last') { }
658 0 0 if $$data{$name}{$k}
670 0 12037 if ($$self{'duplicate_directives'} eq 'error') { }
12037 0 elsif ($$self{'duplicate_directives'} eq 'last') { }
672 0 0 if $$data{$name}
700 7719 6877 if (not $values =~ /['"\s]/) { }
6751 126 elsif (not $values =~ /['"]/) { }
711 86 126 if (not $values =~ /^["']/) { }
717 0 126 unless length $val
730 0 14596 unless @val
732 12553 2043 wantarray ? :
745 0 16 unless defined $val
756 11751 0 unless $case
757 0 11751 unless $hdir and ref $hdir eq 'ARRAY'
759 11751 0 unless $case
760 510 11241 if $name eq $_
826 2 203 if @_ == 1
829 203 0 unless $$self{'case_sensitive'}
835 3 0 if (not defined $val and $$self{'_parent'} and $$self{'inheritance_support'})
846 0 203 unless defined $val
851 203 0 if ($type)
852 1 202 if ($type eq 'ARRAY' and ref $$val[0] eq ref $self) { }
1 201 elsif ($type eq 'HASH') { }
858 1 0 if ($srch) { }
870 14 189 wantarray ? :
926 0 10 ref $_[0] eq 'ARRAY' ? :
927 10 0 unless $$self{'case_sensitive'}
932 0 10 unless $block_array = $$data{$name} and ref $block_array eq 'ARRAY' and ref $$block_array[0] eq ref $self
942 156 14 if (@vals == @{$$block{'_block_vals'};})
944 29 260 unless $vals[$_] eq $$block{'_block_vals'}[$_]
946 9 118 unless wantarray
950 1 0 if @ret
1004 0 4 unless $$self{'autoload_support'}