Condition Coverage

lib/Data/URIID/Service.pm
Criterion Covered Total %
condition 40 214 18.6


and 3 conditions

line !l l&&!r l&&r condition
711 0 0 0 $self->online && $self->extractor->online
1360 0 0 0 defined $json->{'num'} and $json->{'num'} =~ "Data::URIID::Result"->RE_UINT
1361 0 0 0 defined $json->{'title'} and length $json->{'title'}
1372 0 0 0 defined $json->{'title'} and length $json->{'title'}
1433 0 0 0 defined $json->{'hash'} and $json->{'hash'} =~ /^[0-9a-f]{32}$/
1434 0 0 0 defined $json->{'filesize'} and int $json->{'filesize'}
1435 0 0 0 defined $json->{'ext'} and $json->{'ext'} =~ /^\.?([0-9a-z]{1,5})$/
1447 0 0 0 defined(my $image = $json->{'image'}) and defined(my $directory = $json->{'directory'})
1497 0 0 0 defined $raw{'twitter:player:stream'} and length $raw{'twitter:player:stream'}
1533 0 0 0 defined $attr{'thumbnail'} and defined(my $url = $attr{'thumbnail'}{'*'})
1550 0 0 0 defined $own_metadata{'services'}{$name} and defined(my $displayname = $own_metadata{'services'}{$name}{'displayname'}{'*'})

or 2 conditions

line l !l condition
640 36 180 $own_well_known{'uuid'}{$uuid} //= {}
36 180 +($own_well_known{'uuid'}{$uuid} //= {})->{'attributes'} //= {}
644 0 108 $e->{'displayname'} //= {}
648 36 180 $e->{'displaycolour'} //= {}
661 180 892 $entry->{'attributes'}{'displaycolour'} // (next)
662 180 0 $dpca->{'*'} // (next)
663 180 0 $own_well_known{'uuid'}{$displaycolour->ise} //= {}
180 0 +($own_well_known{'uuid'}{$displaycolour->ise} //= {})->{'attributes'} //= {}
664 180 0 $e->{'displaycolour'} //= {}
678 1075 220 $src->{'ids'} //= {}
679 1295 0 $src->{'attributes'} //= {}
684 2651 28 $own_well_known{$id_type_inner} //= {}
1791 888 ($own_well_known{$id_type_inner} //= {})->{$s_ids->{$id_type_inner}} //= {}
686 133 904 $dst->{'ids'} //= {}
687 149 888 $dst->{'attributes'} //= {}
758 0 0 $self->{'setting'} //= {}
773 0 0 $own_metadata{'services'}{$name} //= {}
905 0 0 $res->{'attributes'} //= {}
908 0 0 $filters //= {}
920 0 0 $attr->{$attrname} //= {}
948 6 0 $result->{'primary'}{'ise_order'} // ["uuid", "oid", "uri"]
956 18 0 eval {
958 0 54 eval {
959 0 0 $attr{'displayname'} //= {}
979 0 0 $attributes // {}
980 0 0 $attr{$attr} //= {}
986 0 0 $ids // {}
1001 6 0 $result->{'primary'}{'ise_order'} // ["uuid", "oid", "uri"]
1018 0 0 $attr{'displayname'} //= {"*", $displayname}
1100 0 0 $item->{'type'} // ""
1101 0 0 $item->{'value'} // ""
1123 0 0 $data->{'claims'}{$property} // []
1129 0 0 $data->{'claims'}{$special->{'property'}} // []
1135 0 0 $data->{'claims'}{$attribute->{'property'}} // []
1142 0 0 $attr{$key} //= []
1225 0 0 eval {
1226 0 0 $self->_get_json(sprintf("https://api.fellig.org/v0/overview/%s/%s", $type, uri_escape($id)), "local_override", ["overview/%s/%s.json", $type, $id]) // (next)
1238 0 0 $tag->{$class}{$relation} // {}
1271 0 0 (eval {
1272 0 0 $self->_get_json("https://noembed.com/embed", "query", {"url", $url}) // (next)
1287 0 0 $element->{'tags'} // {}
1321 0 0 eval {
1322 0 0 $self->_get_json(sprintf('https://api.openstreetmap.org/api/0.6/%s/%s.json', $type, $id), "local_override", ["%s/%s.json", $type, $id]) // (next)
1323 0 0 eval {
1333 0 0 $self->_get_json("https://overpass-api.de/api/interpreter", "query", {"data", sprintf(qq[[out:json][timeout:25];\n(node["wikidata"="%s"];\nway["wikidata"="%s"];\nrelation["wikidata"="%s"];\n);\nout;], $id, $id, $id)}) // (return undef)
1338 0 0 eval {
1340 0 0 $element->{'type'} // ""
1341 0 0 $element->{'id'} // ""
1355 0 0 $self->_get_json($opts{'metadata_url'} // $result->url("service", "xkcd", "action", "metadata"), "local_override", ["%s.json", $id]) // (return undef)
1368 0 0 $self->_get_json($result->url("service", "doi", "action", "metadata")) // (return undef)
1380 0 0 $self->_get_json($result->url("service", "iconclass", "action", "metadata"), "local_override", ["%s.jsonld", $id]) // (return undef)
1381 0 0 $json->{'graph'}[0] // (return undef)
1398 0 0 $self->_get_json($result->url("service", "e621", "action", "metadata")) // (return undef)
1427 0 0 $self->_get_html($url) // (return undef)
1428 0 0 ($html->findnodes("//script[\@id=\"metadata\" and \@type=\"application/json\"]"))[0] // (return undef)
1464 0 0 $self->_get_html($result->url("service", "furaffinity", "action", "info")) // (return undef)
1488 0 0 $self->_get_html($result->url("service", "imgur", "action", "info")) // (return undef)
1506 0 0 $self->_get_html($result->url("service", "notalwaysright", "action", "info")) // (return undef)
1527 0 0 $self->_get_html($result->url("service", "ruthede", "action", "info")) // (return undef)

or 3 conditions

line l !l&&r !l&&!r condition
645 0 108 0 $e->{'displayname'}{'*'} //= $name
649 36 180 0 $e->{'displaycolour'}{'*'} //= $colour_object
665 180 0 0 $e->{'displaycolour'}{'*'} //= $displaycolour
689 133 109 0 $s_ids->{$_} //= $d_ids->{$_}
690 149 88 0 $s_attrs->{$_} //= $d_attrs->{$_}
740 13 13 0 $self->{'name'} //= $self->extractor->ise_to_name("service", $self->ise)
892 0 0 0 eval {
911 0 0 0 $attrmap_open_graph{$key} // croak('BUG: Unknown key name: ' . $key)
921 0 0 0 $attr->{$attrname}{'*'} //= $value
960 0 0 0 $displayname->{'*'} //= $name
987 0 0 0 $ids{$id_type} //= $ids->{$id_type}
1025 42 18 0 $ids{$type eq "sid" ? "small-identifier" : $type} //= $value
1130 0 0 0 $ids{$special->{'type'}} //= $special->{'from_service'}->($entry->{'mainsnak'}{'datavalue'}{'value'})
1138 0 0 0 $attr{$_} //= $res{$_}
1240 0 0 0 $ids{$idtype} //= $tag->{$class}{$relation}{$idtype}[0]
1271 0 0 0 eval {
1343 0 0 0 $type eq "node" or $type eq "way"
0 0 0 $type eq "node" or $type eq "way" or $type eq "relation"
1355 0 0 0 $opts{'metadata_url'} // $result->url("service", "xkcd", "action", "metadata")
1387 0 0 0 $displayname{$entry->{'lang'}} //= $entry->{'value'}
1391 0 0 0 $displayname{'en'} // $displayname{'de'}