Branch Coverage

blib/lib/Module/Reader.pm
Criterion Covered Total %
branch 72 112 64.2


line true false branch
20 3 0 exists &Config::non_bincompat_options ? :
29 3 0 "$]" >= 5.008 ? :
40 0 18 if @_
48 0 0 if @_
56 18 65 if (@_ == 1 and ref $_[-1]) { }
65 0 elsif (@_ % 2 == 0) { }
68 0 83 if exists $options{'found'} and $options{'found'} eq 1
70 19 64 unless exists $options{'pmc'}
72 83 0 unless exists $options{'open'}
98 16 67 $file =~ m[^\.\.?/] ? :
0 83 'File::Spec'->file_name_is_absolute($file) ? :
107 16 67 unless (_searchable($file))
109 12 4 if $open
116 17 50 if (my $found = $self->{'found'})
117 17 0 if (defined(my $full = $found->{$file}))
118 1 16 length ref $full ? :
120 13 4 if $open
125 67 0 unless ($all)
126 13 54 if @found
128 0 54 if $@
135 41 34 if (not length ref $inc) { }
144 45 21 if $open
147 75 0 unless ($all)
148 45 30 if @found
150 9 21 if $@
154 0 0 unless $all
161 16 57 unless defined $file
163 49 24 $self->{'pmc'} && $file =~ /\.pm\z/ ? :
169 73 25 -e $try ? :
49 49 if -e $try ? -d _ || -b _ : $! != 13
171 0 49 !$self->{'open'} ? :
49 0 if (!$self->{'open'} ? -e _ : CORE::open(my $fh, '<:', $try))
172 49 0 $fh ? :
25 24 defined $inc ? :
181 0 0 unless $pmc
197 6 25 ref $inc eq 'ARRAY' ? :
4 31 defined &Scalar::Util::blessed($inc) ? :
203 3 23 unless length ref $cb[0]
211 9 14 if (&reftype($cb[0]) eq 'GLOB' and &openhandle($cb[0]))
215 12 11 if ((&reftype($cb[0]) || '') eq 'CODE') { }
2 9 elsif (not $fh) { }
218 0 12 @cb > 1 ? :
223 9 12 defined $fh ? :
12 9 defined $cb ? :
0 21 defined $cb_options ? :
246 58 12 if (not exists $opts{'module'} and $opts{'filename'} and $opts{'filename'} =~ m[\A(\w+(?:/\w+)?)\.pm\z])
264 0 0 !$_[0]{'disk_file'} ? :
266 0 0 unless open my $fh, '<:', $_[0]{'disk_file'}
273 0 9 if exists $self->{'content'}
276 9 0 if ($fh and not $cb)
280 0 0 unless $self->read_callback_options
283 0 0 $fh ? :
284 0 0 unless defined $_
288 0 0 unless &$cb(0, @params)
297 0 0 if ($fh and not $self->read_callback and -f $fh)
298 0 0 unless open my $dup, '<&', $fh