Branch Coverage

blib/lib/Geo/GeoNames.pm
Criterion Covered Total %
branch 42 76 55.2


line true false branch
268 0 10 ref $_[0] eq 'HASH' ? :
270 0 10 if (not defined $class) { }
0 10 elsif (ref $class) { }
282 2 8 unless length $args{'username'}
293 3 5 if exists $args{'ua'} and not ref $args{'ua'} && builtin::blessed($args{'ua'}) && ($args{'ua'}->isa('Mojo::UserAgent') || $args{'ua'}->isa('LWP::UserAgent'))
306 0 1 if @_ == 2
328 5 0 if (@_)
346 8 1 if @_ == 2
361 0 1 if ($flags =~ /d/ and exists $hash->{$arg})
365 0 31 if ($flags eq "r" and not exists $hash->{$arg})
368 0 26 if (not $flags =~ /m/ and exists $hash->{$arg} and ref $hash->{$arg})
371 3 28 if ($flags eq "rc")
373 1 2 if (exists $hash->{$arg})
379 0 1 if ($conditional_mandatory_required == 1 and $conditional_mandatory_flag != 1)
383 0 2 unless defined $valid_parameters{$request}{$key}
384 0 2 ref $hash->{$key} ? :
400 1 2 if ($xml->{'status'})
405 1 1 if $single_result
409 2 3 if ref $xml->{$element} ne "ARRAY"
411 1 2 if ref $list ne "HASH"
413 48 48 unless defined $list->{$attribute}[0]
414 47 1 scalar @{$list->{$attribute};} == 1 ? :
439 0 1 if ($self->{'logger'})
445 1 0 if ($res->can("res"))
447 0 1 unless ($response->is_success)
457 0 0 unless ($res->is_success)
464 0 0 $res->can('res') ? :
474 0 1 unless defined $response
478 0 1 unless ($status_code >= 200 and $status_code < 300)
492 1 0 $response->can('body') ? :
495 1 0 if ($base_mime_type eq "text/xml" or $base_mime_type eq "application/xml")
500 0 0 if ($base_mime_type eq "application/json")
503 0 0 if ($body =~ /\A\{/) { }
504 0 0 if ($response->can('json')) { }
515 0 0 if ($base_mime_type eq 'text/plain') { }
0 0 elsif ($base_mime_type eq 'text/html') { }
532 0 1 unless ref $self
536 0 1 unless (exists $self->{'_functions'}{$name})