Branch Coverage

blib/lib/CGI/Ex/Conf.pm
Criterion Covered Total %
branch 27 186 14.5


line true false branch
103 1 2 if (ref $file) { }
0 2 elsif (exists $CACHE{$file} and not $args->{'no_cache'}) { }
0 2 elsif (index($file, "\n") != -1) { }
1 1 elsif ($args->{'file_type'}) { }
1 0 elsif ($file =~ /\.(\w+)$/) { }
104 0 1 if (UNIVERSAL::isa($file, 'SCALAR')) { }
105 0 0 if ($$file =~ /^\s*
129 0 0 defined $DEFAULT_EXT ? :
0 0 defined $args->{'default_ext'} ? :
131 0 0 length $ext ? :
138 1 1 unless (-e $file)
140 0 0 unless $args->{'no_warn_on_fail'} or $NO_WARN_ON_FAIL
164 0 1 unless ref $self
169 0 1 if (ref $namespace or index($namespace, "\n") != -1 or $namespace =~ m[^\.{0,2}/.+$]) { }
182 0 1 unless ref $paths
183 0 1 if ($directive eq "LAST")
185 0 0 if $#$paths != 0
188 0 1 if exists $CACHE{$path} and not $CACHE{$path}
194 0 1 if ($#paths == -1)
201 0 0 if (not $REF) { }
0 0 elsif (not UNIVERSAL::isa($ref, ref $REF)) { }
202 0 0 if (UNIVERSAL::isa($ref, 'ARRAY')) { }
0 0 elsif (UNIVERSAL::isa($ref, 'HASH')) { }
213 0 0 if (ref $REF eq 'ARRAY') { }
214 0 0 if ($directive eq "MERGE")
223 0 0 if ($directive eq "MERGE")
225 0 0 if $IMMUTABLE->{$key}
227 0 0 if $immute or $immutable
235 0 0 if $immute or $immutable
241 0 1 if scalar keys %$IMMUTABLE
258 0 1 $#ref != 0 ? :
264 0 0 unless open IN, $file
268 0 0 'JSON'->can('decode') ? :
281 0 0 unless open IN, $file
291 0 0 if ($@)
294 0 0 $#ret == 0 ? :
311 0 0 unless (eval { do { require YAML } })
316 0 0 if $sub =~ /\bpreload_files$/
323 0 0 unless open IN, $file
334 0 0 unless $key and $key =~ /^\w+$/
349 0 0 if ($line =~ /^(document\.|var\s)/) { }
357 0 0 if ($line =~ /
0 0 elsif ($line =~ /\bname\s*=\s*('[^\']*'|"[^\"]*"|\S+)/) { }
358 0 0 if $yaml =~ /^( +)/s
370 0 0 if $str and $#order != -1 and $key eq "validation"
373 0 0 unless $str
375 0 0 if ($@)
377 0 0 if ($err =~ /line:\s+(\d+)/)
380 0 0 if --$line
398 0 1 if (ref $file) { }
0 1 elsif (index($file, "\n") != -1) { }
0 1 elsif (exists $CACHE{$file} and not $args->{'no_cache'}) { }
1 0 elsif ($args->{'file_type'}) { }
0 0 elsif ($file =~ /\.(\w+)$/) { }
416 0 0 defined $DEFAULT_EXT ? :
0 0 defined $args->{'default_ext'} ? :
418 0 0 length $ext ? :
423 0 1 if ($args->{'handler'})
425 0 0 UNIVERSAL::isa($args->{'handler'}, 'CODE') ? :
427 1 0 unless ($handler)
452 0 0 unless ref $self
457 0 0 if (ref $namespace or $namespace =~ m[^\.{0,2}/.+$]) { }
0 0 elsif (index($namespace, "\n") != -1) { }
472 0 0 unless ref $paths
473 0 0 if ($directive eq "LAST")
475 0 0 if $#$paths != 0
478 0 0 if exists $CACHE{$path} and not $CACHE{$path}
484 0 0 if ($#paths == -1)
489 0 0 if ($directive eq 'FIRST') { }
0 0 elsif ($directive eq 'LAST' or $directive eq 'MERGE') { }
498 0 0 if (UNIVERSAL::isa($conf, "HASH") and $conf->{'Immutable Keys'})
533 1 0 if ($str =~ s/^(.+?=\s*)//s)
537 0 1 if ($str =~ /\$VunderVar/)
542 0 1 unless open OUT, ">$file"
552 0 0 if ('JSON'->can('encode')) { }
561 0 0 unless open OUT, ">$file"
585 0 0 unless open OUT, ">$file"
604 0 0 if ($self->{'handler'}) { }
605 0 0 if (UNIVERSAL::isa($self->{'handler'}, "HASH"))
610 0 0 unless ($self->{'html_key'} or $HTML_KEY)
614 0 0 unless keys %EXT
617 0 0 ref $paths ? :
620 0 0 if exists $CACHE{$path}
621 0 0 if (-f $path) { }
0 0 elsif (-d _) { }
622 0 0 $path =~ /\.(\w+)$/ ? :
623 0 0 unless $EXT{$ext}
629 0 0 if exists $CACHE{$File::Find::name}
630 0 0 if $File::Find::name =~ m[/CVS/]
631 0 0 unless -f $_
632 0 0 /\.(\w+)$/ ? :
633 0 0 unless $EXT{$ext}
643 0 0 @_ == 2 ? :