Branch Coverage

blib/lib/CPANPLUS/Dist/Gentoo/Atom.pm
Criterion Covered Total %
branch 81 88 92.0


line true false branch
55 32 279 if (defined $args{'name'}) { }
277 2 elsif (defined $args{'atom'}) { }
57 1 31 unless defined $category
58 2 29 unless $category =~ /^$category_rx$/o
59 2 27 unless $name =~ /^$name_rx$/o
62 49 228 unless $atom =~ m[^($range_rx)?($category_rx)/($name_rx)(?:-($version_rx))?$]o
69 216 39 if (defined $version)
70 215 1 unless (&Scalar::Util::blessed($version) and $version->isa('CPANPLUS::Dist::Gentoo::Version'))
76 215 39 if (defined $version) { }
77 65 150 if (defined $range) { }
78 1 64 unless $range =~ /^$range_rx$/o
83 2 37 if defined $range and length $range
107 1 4 unless defined $ebuild
109 3 2 unless $ebuild =~ m[/($category_rx)/($name_rx)/\2-($version_rx)\.ebuild$]o
160 152 266 unless ($blessed and $a2->isa('CPANPLUS::Dist::Gentoo::Atom'))
161 48 104 if ($blessed and $a2->isa('CPANPLUS::Dist::Gentoo::Version')) { }
166 48 56 if (my $err = $@) { }
168 0 48 if $@
176 322 96 if (defined $a2)
181 0 322 unless $p1 eq $p2
184 0 418 if $r
186 72 346 unless defined $v1 and defined $v2
195 224 0 if (defined $a2)
198 168 56 unless (&Scalar::Util::blessed($a2) and $a2->isa('CPANPLUS::Dist::Gentoo::Atom'))
200 0 168 if $@
204 112 112 if (my $c = $p1 cmp $p2)
205 56 56 $r ? :
218 666 106 if defined $version
238 64 12 unless length ref $_[0]
241 4 72 unless @_
244 6 66 if @_
248 0 72 unless $p1 eq $p2
251 8 64 unless defined $v1
255 6 58 unless defined $v2
261 8 50 if $o1 * $o2 < 0
263 18 32 if ($r2 eq '=')
270 26 24 if ($r1 eq '=') { }
9 15 elsif ($o1 > 0) { }
271 10 16 $r2 eq '=' ? :
272 14 12 unless eval "\$a1 $r \$a2"
275 3 6 $a1 < $a2 ? :
277 3 12 $a1 < $a2 ? :
288 3 0 unless length ref $_[0]
295 6 6 defined $cur ? :