Branch Coverage

blib/lib/REST/Client/CrossRef.pm
Criterion Covered Total %
branch 99 182 54.4


line true false branch
356 0 2 if ($self->version)
360 2 0 if (defined $self->mailto)
395 0 0 if (ref $args[0] eq 'HASH') { }
415 5 3 unless exists $ar->{$filter_name}
442 0 1 if $ar->{'json_path'} and $ar->{'keys_to_keep'}
448 2 7 if $self->test_data
449 0 7 $self->version ? :
454 0 7 if ($query_ar)
468 12 2 if $value
471 6 1 if $self->rows
472 6 1 if $self->cursor
477 0 7 if $self->page_start_at and $self->page_start_at > $self->rows
479 6 1 if @params > 0
483 0 7 if ($self->sleep > 0)
492 0 7 defined $val ? :
494 0 7 defined $val ? :
501 0 21 if $response->responseHeader($k)
505 0 7 if ($backoff > 0) { }
0 7 elsif ($code eq '429' or $code eq '503') { }
509 0 0 defined $retryAfter ? :
517 0 7 unless $code eq '200'
526 1 7 $self->test_data ? :
534 0 8 unless $response
538 1 7 $self->test_data ? :
545 7 1 if (defined $res_count and $res_count > 0)
567 0 1 if ($param_ar) { }
578 1 0 if ($response)
581 1 0 $self->test_data ? :
587 0 1 if (defined $res_count) { }
590 0 0 if ($res_count > 0)
613 1 8 if $self->spit_raw_data
617 6 2 if ($hr->{'message'}{'items'}) { }
625 6 2 if (defined $self->{'json_path'}) { }
2 0 elsif (defined $self->{'keys_to_keep'}) { }
644 0 90 if ($self->{'json_path_callback'} and $self->{'json_path_callback'}{$path}) { }
90 0 elsif (@val) { }
649 0 0 if @val
650 0 0 if $@
695 0 0 if ($self->{'sort_output'}) { }
705 0 0 if $self->add_end_flag
717 32 0 if ($filter_hr) { }
728 151 93 unless defined $pos
735 93 0 defined $result_hr->{$key} ? :
749 31 1 if $self->add_end_flag
754 0 0 if ($self->{'sort_output'}) { }
765 0 0 if $self->add_end_flag
796 0 0 unless defined $doi
808 0 0 unless defined $doi
822 0 1 unless defined $doi
839 0 1 unless defined $id
840 1 0 $select ? :
845 0 1 $select eq '*' ? :
851 0 2 if ($k eq 'name') { }
0 2 elsif ($k eq 'orcid') { }
860 0 0 $href->{$k} =~ m[^https*://orcid.org/] ? :
912 0 1 unless $id
965 0 0 unless $field =~ /(?:container-)*title$|author$|editor$|chair$|translator$|contributor$|bibliographic$|affiliation$/
969 0 0 unless $field =~ /^query\./
1015 5 0 defined $self->cursor ? :
1019 5 0 if ($self->cursor)
1029 0 5 if ($last_start and $self->{'last_page_items_count'} >= $self->rows)
1055 0 0 if ($response)
1060 0 0 if $self->spit_raw_data
1080 0 0 unless $loc
1100 6 1 if (exists $msg{'next-cursor'} and $n_items >= $self->rows) { }
1148 37 3 $result_hr ? :
1156 24 190 if (ref $raw_hr->{$k} eq 'HASH') { }
30 160 elsif (ref $raw_hr->{$k} eq 'ARRAY') { }
1161 24 0 $result_hr ? :
1168 30 0 $result_hr ? :
1172 10 20 if defined $$result_hr{$$key_ar[$#$key_ar]}
1179 26 134 if ref $raw_hr->{$k}
1182 1 159 if (defined $self->{'keys_to_keep'} and defined $self->{'keys_to_keep'}{$key}) { }
1200 40 0 $result_hr ? :
1208 45 123 $res_hr ? :
1213 1 167 if ($key eq 'author') { }
1219 1 1 if ($aut->{'sequence'} eq 'first') { }
1220 1 0 if ($aut->{'family'}) { }
0 0 elsif ($aut->{'name'}) { }
1226 1 0 defined $aut->{'given'} ? :
1239 1 0 if ($aut->{'family'}) { }
0 0 elsif ($aut->{'name'}) { }
1245 1 0 defined $aut->{'given'} ? :
1268 14 194 if (ref $val eq 'HASH') { }
48 146 elsif (ref $val eq 'ARRAY') { }
1272 0 14 if defined $$res_hr{$key_ar->[$last]}
1274 14 0 $res_hr ? :
1280 48 0 $res_hr ? :
1286 2 144 if (defined $self->{'keys_to_keep'} and defined $self->{'keys_to_keep'}{$last_key}) { }
1289 2 0 if (defined $val) { }
1306 168 0 $res_hr ? :