Branch Coverage

blib/lib/API/Octopart.pm
Criterion Covered Total %
branch 0 52 0.0


line true false branch
116 0 0 unless $valid_opts{$arg}
122 0 0 unless $args{'token'}
297 0 0 if ($self->{'cache'})
299 0 0 unless -d $self->{'cache'}
307 0 0 if (-e $hashfile and $age_days < $self->{'cache_age'})
309 0 0 if ($self->{'ua_debug'})
314 0 0 if (open my $in, $hashfile) { }
327 0 0 unless ($content)
333 0 0 if ($self->{'query_limit'} and $self->{'api_queries'} >= $self->{'query_limit'})
341 0 0 if ($self->{'ua_debug'})
386 0 0 if (not $response->is_success) { }
402 0 0 unless ($response->is_success)
411 0 0 if (not $j->{'errors'}) { }
413 0 0 if ($hashfile)
415 0 0 unless open my $out, ">", $hashfile
430 0 0 if ($self->{'json_debug'})
432 0 0 if ($hashfile)
468 0 0 if ($self->{'include_specs'})
524 0 0 unless $_valid_filter_opts{$o}
535 0 0 if (defined $r->{'specs'})
546 0 0 $_->{'units'} ? :
0 0 defined $_->{'attribute'}{'shortname'} ? :
561 0 0 if defined $opts{'currency'} and $p->{'currency'} ne $opts{'currency'}
569 0 0 if (not defined $ss{$s->{'company'}{'name'}}{'moq'} or $ss{$s->{'company'}{'name'}}{'moq'} > $moq)
589 0 0 if defined $opts{'mfg'} and not $r->{'mfg'} =~ /$opts{'mfg'}/i
593 0 0 if (not defined $r->{'sellers'}{$s}{'price_tier'} or defined $opts{'min_qty'} and $r->{'sellers'}{$s}{'stock'} < $opts{'min_qty'} or defined $opts{'max_price'} and $r->{'sellers'}{$s}{'moq_price'} > $opts{'max_price'} or (defined $opts{'max_moq'} and $r->{'sellers'}{$s}{'moq'} > $opts{'max_moq'} or defined $opts{'seller'} and not $s =~ /$opts{'seller'}/i))