Branch Coverage

blib/lib/IO/Detect.pm
Criterion Covered Total %
branch 35 56 62.5


line true false branch
40 18 0 if B::svref_2object($_)->STASH->NAME eq $into
64 20 6 unless &blessed($object)
66 1 5 unless $methods
68 1 1 unless $object->can($m)
79 0 2 unless @_
91 5 4 @_ ? :
93 3 6 if &openhandle($fh)
98 1 5 unless defined $reftype
100 0 2 if ($reftype eq 'IO' or $reftype eq 'GLOB' and *{$fh;}{'IO'})
105 0 4 unless defined $_
106 0 0 unless $_ >= 0
113 0 2 if &blessed($fh) and $fh->DOES('IO::Handle')
114 0 2 if &blessed($fh) and $fh->DOES('FileHandle')
115 0 2 if &blessed($fh) and $fh->DOES('IO::All')
127 4 0 @_ ? :
128 0 4 if &blessed($f) and $f->DOES('IO::All')
129 0 4 if &blessed($f) and $f->DOES('Path::Class::Entity')
130 0 4 if &blessed($f) and overload::Method($f, '""')
132 2 2 if defined $f and not ref $f
139 3 0 @_ ? :
140 0 3 if &blessed($f) and $f->DOES('URI::file')
141 0 3 if &blessed($f) and $f->DOES('RDF::Trine::Node::Resource')
142 0 3 if $f =~ m[^file://\S+]i
153 1 0 @_ ? :
154 0 1 if &is_filehandle($f)
156 0 1 if (my $uri = &is_fileuri($f))
160 0 1 unless open my $fh, $mode, $f
194 2 27 if (&blessed($proto) and $proto->isa('IO::Detect::SmartMatcher'))