Branch Coverage

blib/lib/Net/CVE.pm
Criterion Covered Total %
branch 54 88 61.3


line true false branch
29 6 15 if (@_)
30 1 5 if (@_ == 1 and ref $_[0] eq 'HASH') { }
5 0 elsif (@_ == 2) { }
42 0 4 unless my $self = shift()
43 0 4 unless ref $self
44 0 4 unless my $d = $self->{'diag'}
45 0 4 unless (defined wantarray)
50 0 0 if $d->{'source'}
51 0 0 if $d->{'usage'}
58 2 17 unless ref $self
61 1 18 unless $cve
63 5 13 if ($cve =~ /^CVE-[0-9]{4}-([0-9]+)$/u) { }
12 1 elsif (-s $cve) { }
67 1 4 unless ($r->{'success'})
72 1 0 $status =~ /^5[0-9][0-9]$/u ? :
86 0 12 unless (open $fh, "<:encoding(utf-8)", $cve)
96 2 10 unless (eval {
124 1 7 unless ref $self
125 2 6 if @_
131 1 9 unless ref $self
132 2 8 if @_
133 0 10 unless my $j = $self->{'data'}
134 0 10 unless my $cna = $j->{'containers'}{'cna'}
137 0 10 unless $cna->{'metrics'}
138 0 10 unless $cna->{'metrics'}
141 0 10 unless $cna->{'descriptions'}
142 0 30 unless my $d = $_->{'value'}
152 0 10 unless $_->{'descriptions'}
0 10 unless $cna->{'problemTypes'}
153 0 22 unless my $d = $_->{'description'}
177 0 10 if @_
178 0 10 unless my $j = $self->{'data'}
184 0 20 unless my $j = $self->{'data'}
185 0 20 unless my $cna = $j->{'containers'}{'cna'}
186 0 20 unless $cna->{'affected'}
188 20 0 wantarray ? :
193 0 10 unless my $j = $self->{'data'}
194 0 10 unless my $cna = $j->{'containers'}{'cna'}
195 0 64 unless $_
196 0 10 unless $cna->{'affected'}
198 10 0 wantarray ? :
203 0 10 if @_
209 0 10 if @_
215 0 10 if @_