Branch Coverage

blib/lib/CPAN/Common/Index/Mirror.pm
Criterion Covered Total %
branch 61 76 80.2


line true false branch
41 5 25 unless defined $cache
43 0 30 unless (-d $cache)
50 16 14 unless defined $mirror
101 7 24 unless -r $package
110 4 6 unless -r $mailrc
118 10 14 unless $HAS_IO_UNCOMPRESS_GUNZIP
121 0 24 unless my $where = $ff->fetch('to', $self->cache)
123 14 10 if ($HAS_IO_UNCOMPRESS_GUNZIP)
126 0 14 unless IO::Uncompress::Gunzip::gunzip($where, $uncompressed)
137 4 0 -r $package ? :
142 0 51 unless ref $args eq 'HASH'
146 0 51 unless -r $index_path
149 0 51 unless tie *$fh, 'Tie::Handle::SkipHeader', '<', $index_path
159 36 15 if ($args->{'package'} and ref $args->{'package'} eq '') { }
162 0 36 if $pos == -1
165 34 42 unless $line =~ /\A\Q$args->{'package'}\E\s+/i
175 31 20 wantarray ? :
180 0 10 unless ref $args eq 'HASH'
184 0 10 unless -r $index_path
185 0 10 unless open my $fh, $index_path
194 4 6 if ($args->{'id'} and ref $args->{'id'} eq '') { }
197 0 4 if $pos == -1
207 6 4 wantarray ? :
212 0 66 if ref $arg eq 'CODE'
228 0 778677 unless defined $line
230 519132 259545 if ($rules->{'package'})
231 519061 71 unless $rules->{'package'}->($mod)
233 38 259578 if ($rules->{'version'})
234 33 5 unless $rules->{'version'}->($version)
236 259545 38 if ($rules->{'dist'})
237 259540 5 unless $rules->{'dist'}->($dist)
249 0 31726 unless defined $line
253 10578 21148 if ($rules->{'id'})
254 10572 6 unless $rules->{'id'}->($id)
256 10574 10580 if ($rules->{'fullname'})
257 10572 2 unless $rules->{'fullname'}->($fullname)
259 10574 8 if ($rules->{'email'})
260 10572 2 unless $rules->{'email'}->($email)