Branch Coverage

lib/Image/Info.pm
Criterion Covered Total %
branch 61 80 76.2


line true false branch
34 1 79 if ref $source eq "HASH"
39 0 79 if ref $head eq "HASH"
41 0 79 unless my $format = determine_file_format($head)
57 31 49 unless (defined &$sub)
59 0 31 if (my $fail = $mod_failure{$mod})
63 0 31 if ($@)
67 0 31 unless defined &$sub
78 1 79 if $@
79 4 75 wantarray ? :
85 1 1 if ref $source eq "HASH"
88 0 1 unless my $head = _head($source)
89 0 1 unless my $format = determine_file_format($head)
100 57 26 if (not ref $source) { }
26 0 elsif (ref $source eq 'SCALAR') { }
102 0 57 if ($] < 5.006) { }
105 0 0 unless open $fh, $source
108 2 55 unless open $fh, "<", $source
119 26 0 if (eval { do { require PerlIO::scalar; 'PerlIO::scalar'->VERSION(0.21) } } or not eval { do { require IO::Scalar; 1 } }) { }
121 0 26 unless open my $s, "<", $source
129 0 0 unless seek $source, 0, 0
146 0 80 unless $read
148 0 80 if (ref $source eq 'IO::String') { }
153 0 80 unless seek $source, 0, 0
168 17 64 if /^\xFF\xD8/
169 8 56 if /^\x89PNG\x0d\x0a\x1a\x0a/
170 9 47 if /^GIF8[79]a/
171 1 46 if /^MM\x00\x2a/
172 5 41 if /^II\x2a\x00/
173 4 37 if /^BM/
174 3 34 if /^\000\000\001\000/
175 8 26 if /^P[1-6]/
176 3 23 if m((^/\* XPM \*/)|(static\s+char\s+\*\w+\[\]\s*=\s*{\s*"\d+))
177 5 18 if m[^(?:/\*.*\*/\n)?#define\s]
178 3 15 if /\A....ftypavif/s
179 5 10 if /^(<\?xml|[\012\015\t ]*
180 10 0 if /^RIFF.{4}WEBP/s
189 4 13 wantarray ? :
195 1 1 unless $x
220 1627 111 if @$a <= 1
227 124 64 $delete ? :