Branch Coverage

blib/lib/Geo/WebService/Elevation/USGS.pm
Criterion Covered Total %
branch 42 90 46.6


line true false branch
131 0 3 if ref $class
132 1 2 unless $class
147 1 1 if @args
187 2 1 wantarray ? :
238 0 5 unless (eval { do { $rslt = $self->_request('x', $lon, 'y', $lat, 'units', $self->{'units'}); 1 } })
243 0 5 unless $rslt
246 0 5 unless not $valid or is_valid($rslt)
254 0 0 if ($retry <= $retry_limit)
262 0 0 if $self->{'croak'}
276 2 36 unless $access_type{$name}
309 1 5 if ('HASH' eq $ref) { }
1 4 elsif ($ref) { }
338 2 10 unless $access_type{$name}
340 0 10 unless exists $mutator{$name}
347 0 8 if $clean
355 0 0 unless 'CODE' eq ref $val
362 1 4 if defined $val and not $val =~ / \A \d+ \z /msx
373 0 0 if (defined $val) { }
374 0 0 unless &looks_like_number($val) and $val >= 0
378 0 0 unless $using_time_hires or $val >= 1 or $val == 0
390 0 0 unless defined $val and $val =~ / \A \d+ \z /msx
430 0 10 unless my $info = $dep{$group}
433 0 10 unless defined $item or defined($item = $info->{'dflt'}->())
435 10 0 unless $info->{'item'}{$item}
438 0 0 if $info->{'item'}{$item} > 2
440 0 0 unless warnings::enabled('deprecated')
444 0 0 if $info->{'item'}{$item} == 1
459 0 0 if $self->{'croak'}
460 0 0 if $self->{'carp'}
473 9 5 unless &blessed($object)
496 2 12 if (_instance($obj, $class))
517 0 41 unless ref $self
530 0 5 if ref $self
557 0 5 unless defined $arg{'units'}
558 4 1 $arg{'units'} =~ / \A meters \z /imsx ? :
568 0 5 if $self->{'trace'}
570 0 5 exists $self->{'_hack_result'} ? :
572 0 0 'CODE' eq ref $data ? :
575 0 5 if ($self->{'trace'})
576 0 0 if (my $redir = $rslt->request)
583 0 5 unless $rslt->is_success
587 0 5 unless defined $rslt
594 0 10 unless 'HASH' eq ref $rslt and exists $rslt->{$key}
600 0 5 unless (ref $rslt)
608 5 0 if defined $rslt->{'Elevation'} and defined($places = $self->get('places'))