Branch Coverage

blib/lib/URI/PackageURL.pm
Criterion Covered Total %
branch 55 60 91.6


line true false branch
24 2 60 unless my $type = delete $params{'type'}
26 4 56 unless my $name = delete $params{'name'}
33 13 43 if (grep {$_ eq $type;} "alpm", "apk", "bitbucket", "composer", "deb", "github", "gitlab", "hex", "npm", "oci", "pypi")
37 37 19 if ($namespace)
38 12 25 if (grep {$_ eq $type;} "alpm", "apk", "bitbucket", "composer", "deb", "github", "gitlab", "golang", "hex", "rpm")
44 1 30 if $qualifier =~ /\s/
47 2 53 if $type eq "pypi"
48 4 51 if $type eq "cpan"
50 3 52 if ($type eq "swift")
51 1 2 unless defined $version
52 1 1 unless defined $namespace
55 2 51 if ($type eq "cran")
56 1 1 unless defined $version
59 4 48 if ($type eq "conan")
61 2 2 if ($namespace and $namespace ne '') { }
62 1 1 unless (defined $qualifiers->{'channel'})
67 1 1 if (defined $qualifiers->{'channel'})
108 0 15 unless ($string =~ /$PURL_REGEXP/)
128 1 14 if ($s1[1])
130 3 0 if $_ ne "" and $_ ne "."
148 4 11 if ($s2[1])
157 0 5 if ($key eq "checksums")
193 15 0 if $s5[1]
204 11 4 scalar @s6 > 1 ? :
215 11 4 if (scalar @s6 > 1)
231 28 11 if ($self->namespace)
242 34 5 if $self->version
245 39 0 if (my $qualifiers = $self->qualifiers)
248 16 23 if @qualifiers
253 3 36 if $self->subpath