Condition Coverage

blib/lib/Apache2/SSI/File/Type.pm
Criterion Covered Total %
condition 14 88 15.9


and 2 conditions

line l !l condition
105 0 2 $MAGIC_DATA and scalar @$MAGIC_DATA
110 0 0 $file_abs eq $MAGIC_DATA_SOURCE and scalar @$MAGIC_DATA

and 3 conditions

line !l l&&!r l&&r condition
102 0 0 2 defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
120 0 0 0 -e $path and -s $path
387 0 0 0 not $self->follow_links and -l _
428 1 0 2 -x $file and -T _
474 0 0 3 defined $desc and $desc ne ''
483 33 0 0 warnings::enabled() and $self->debug
489 261 0 0 $m == $#{$$self{'magic_data'};} and $self->{'magic'}{'io'}
0 0 0 $m == $#{$$self{'magic_data'};} and $self->{'magic'}{'io'} and not $self->{'magic'}{'io'}->eof
817 0 0 0 defined $desc and $desc ne ''
827 0 0 0 $m == $#{$$self{'magic_data'};} and not $self->{'magic'}{'io'}->eof
890 0 0 0 defined $type and not $type =~ /;/
943 264 0 0 $self->{'trick'} > 186 and $self->{'trick'} < 192
990 0 0 0 defined $ch and $ch ne "\000"
0 0 0 defined $ch and $ch ne "\000" and $ch ne "\n"

or 2 conditions

line l !l condition
87 2 0 shift @_ || (return)
88 2 0 'IO::File'->new("<$json_file") || (return $self->error(qq[Unable to open our own json magic file "$json_file": $!]))
128 0 0 'IO::File'->new("<$file") || (return $self->error(qq[Unable to open magic file provided "$file": $!]))
135 0 0 $self->as_json || (return)
136 0 0 'IO::File'->new(">$path") || (return $self->error(qq[Unable to write to magic cache json data file "$path": $!]))
230 0 0 'IO::File'->new("<$file") || (return $self->error(qq[Unable to open magic file "$file": $!]))

or 3 conditions

line l !l&&r !l&&!r condition
102 2 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
279 0 0 0 shift @_ || $self->{'magic_data'}
331 3 0 0 shift @_ || do {
385 0 0 3 not -f _ or -z _
411 3 0 0 'IO::File'->new("<$file") || do {
700 0 0 0 $operator eq '>' or $operator eq '<'
719 0 0 0 shift @_ || $self->{'magic_data'}
733 0 0 0 $line =~ /^\#/ or $line =~ /^[[:blank:]\h]*$/
753 0 0 0 $self->read_magic_entry($entry->[2], $depth + 1) < $depth or $io->eof
890 0 0 0 defined $type and not $type =~ /;/ or not defined $type