Branch Coverage

lib/Weather/PurpleAir/API.pm
Criterion Covered Total %
branch 0 98 0.0


line true false branch
278 0 0 if $k0 eq $k1
289 0 0 unless defined $js
296 0 0 if defined $r
308 0 0 unless $score >= $best_score
312 0 0 if $self->opt('best_match_and_score', 0, $opt_hr)
325 0 0 unless @_ and defined $_[0]
326 0 0 if (ref $_[0] eq 'ARRAY') { }
327 0 0 if defined $x and $x eq $v
329 0 0 if defined $x and $x eq $v
344 0 0 unless $self->opt('q') or $self->opt('no_errors')
353 0 0 unless $self->opt('q') or $self->opt('no_warnings')
378 0 0 if ref $sensor_list eq 'ARRAY'
424 0 0 if ($self->opt('g', 0, $opt_hr))
428 0 0 if $self->opt('i', 0, $opt_hr)
430 0 0 if $self->opt('v', 0, $opt_hr)
459 0 0 if $conc > 500 or $conc < 0.05
461 0 0 if ($conc <= 12) { }
0 0 elsif ($conc <= 35.4) { }
0 0 elsif ($conc <= 55.4) { }
0 0 elsif ($conc <= 150.4) { }
0 0 elsif ($conc <= 250.4) { }
0 0 elsif ($conc <= 350.4) { }
478 0 0 unless defined $sensors and ref $sensors eq 'ARRAY'
482 0 0 unless defined $hr
488 0 0 unless ($self->opt('now', 0, $opt_hr))
490 0 0 if (defined $stats_hr) { }
497 0 0 unless $self->opt('raw', 0, $opt_hr)
498 0 0 if defined $aqi
504 0 0 if @$aqi_ar > 0
508 0 0 if ($self->opt('v', 0, $opt_hr) and @$aqi_ar)
510 0 0 if $self->opt('i', 0, $opt_hr)
525 0 0 if ($resp->{'success'}) { }
527 0 0 if defined $stash_path
538 0 0 if ($self->opt('average', 0, $opt_hr)) { }
565 0 0 if $ppm > $hi{'ppm'}
566 0 0 if $ppm < $lo{'ppm'}
574 0 0 if ($hi{'sensor'} and $n_sensors + $n_values > 3)
575 0 0 if $self->opt('d', 0, $opt_hr)
578 0 0 if ($n_sensors > 2) { }
581 0 0 unless abs $ppm - $high_ppm < $high_ppm * $self->opt('prune_threshold', 0.1, $opt_hr)
582 0 0 if $self->opt('d', 0, $opt_hr)
589 0 0 if $self->opt('d', 0, $opt_hr)
597 0 0 $have_pruned ? :
598 0 0 if ($lo{'sensor'} and $n_sensors + $n_values > $prune_threshold)
599 0 0 if $self->opt('d', 0, $opt_hr)
602 0 0 if ($n_sensors > 2) { }
607 0 0 unless not $ppm or abs $ppm - $low_ppm < $low_ppm * $self->opt('prune_threshold', 0.1, $opt_hr)
608 0 0 if $self->opt('d', 0, $opt_hr)
614 0 0 if $self->opt('d', 0, $opt_hr)