Branch Coverage

blib/lib/CPAN/Common/Index/Mirror.pm
Criterion Covered Total %
branch 56 72 77.7


line true false branch
40 5 17 unless defined $cache
42 0 22 unless (-d $cache)
49 13 9 unless defined $mirror
100 1 20 unless -r $package
109 0 5 unless -r $mailrc
118 0 4 unless my $where = $ff->fetch('to', $self->cache)
121 0 4 unless IO::Uncompress::Gunzip::gunzip($where, $uncompressed)
131 2 0 -r $package ? :
136 0 35 unless ref $args eq 'HASH'
140 0 35 unless -r $index_path
143 0 35 unless tie *$fh, 'Tie::Handle::SkipHeader', '<', $index_path
153 26 9 if ($args->{'package'} and ref $args->{'package'} eq '') { }
156 0 26 if $pos == -1
159 24 30 unless $line =~ /\A\Q$args->{'package'}\E\s+/i
169 25 10 wantarray ? :
174 0 5 unless ref $args eq 'HASH'
178 0 5 unless -r $index_path
179 0 5 unless open my $fh, $index_path
188 2 3 if ($args->{'id'} and ref $args->{'id'} eq '') { }
191 0 2 if $pos == -1
201 3 2 wantarray ? :
206 0 43 if ref $arg eq 'CODE'
222 0 775125 unless defined $line
224 516760 258365 if ($rules->{'package'})
225 516702 58 unless $rules->{'package'}->($mod)
227 35 258388 if ($rules->{'version'})
228 32 3 unless $rules->{'version'}->($version)
230 258365 26 if ($rules->{'dist'})
231 258362 3 unless $rules->{'dist'}->($dist)
243 0 31688 unless defined $line
247 10564 21124 if ($rules->{'id'})
248 10561 3 unless $rules->{'id'}->($id)
250 10562 10565 if ($rules->{'fullname'})
251 10561 1 unless $rules->{'fullname'}->($fullname)
253 10562 4 if ($rules->{'email'})
254 10561 1 unless $rules->{'email'}->($email)