| line |
true |
false |
branch |
|
931
|
0 |
6 |
unless defined $uri
|
|
932
|
0 |
6 |
unless $uri->isa("URI")
|
|
951
|
6 |
0 |
if (defined $type)
|
|
955
|
0 |
6 |
unless $id =~ /$syntax{$type_name}/u
|
|
959
|
2 |
4 |
if defined $service
|
|
960
|
1 |
5 |
if defined $action
|
|
962
|
2 |
4 |
if (defined(my $best_service_name = $best_services{$type_name // ""}))
|
|
966
|
0 |
6 |
if (defined $type_name and $type_name eq "uri")
|
|
980
|
6 |
0 |
if (defined $type and defined $id)
|
|
996
|
1 |
5 |
if $scheme eq "http"
|
|
1003
|
3 |
6 |
if (defined $rule->{'host'})
|
|
1004
|
0 |
3 |
unless defined $host
|
|
1005
|
0 |
3 |
if (ref $rule->{'host'}) { }
|
|
1006
|
0 |
0 |
unless $host =~ /$rule->{'host'}/u
|
|
1008
|
0 |
3 |
unless $host eq $rule->{'host'}
|
|
1011
|
9 |
0 |
if (defined $rule->{'path'})
|
|
1012
|
3 |
6 |
unless defined $path and @res = $path =~ /$rule->{'path'}/u
|
|
1015
|
0 |
6 |
if (defined $rule->{'prepare'})
|
|
1017
|
0 |
0 |
unless defined $ud
|
|
1021
|
8 |
22 |
if (my $ref = ref $value)
|
|
1022
|
6 |
2 |
if ($ref eq 'SCALAR') { }
|
|
|
0 |
2 |
elsif ($ref eq 'CODE') { }
|
|
1036
|
0 |
0 |
unless $func
|
|
1040
|
0 |
0 |
unless defined $self->{'primary'}
|
|
1050
|
50 |
26 |
if $have->{$service}
|
|
1064
|
0 |
26 |
if (defined $res->{'url_overrides'})
|
|
1077
|
6 |
6 |
if $mode eq "online" and not $extractor->online
|
|
1084
|
116 |
76 |
if $done{$service}
|
|
1092
|
0 |
0 |
if $done{$service}
|
|
1106
|
0 |
0 |
if ($host eq 'www.youtube.com') { }
|
|
|
0 |
0 |
elsif ($host =~ /^[a-z]{2}\.wikipedia\.org$/u) { }
|
|
|
0 |
0 |
elsif ($host eq 'xkcd.com' and $path eq '/' || $path eq '/info.0.json') { }
|
|
|
0 |
0 |
elsif ($host eq 'uriid.org' and $path =~ m[^/(?:[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}|[a-z-]+|[a-zA-Z])/.+$]u) { }
|
|
|
0 |
0 |
elsif ($host eq 'uriid.org' or $host eq 'api.uriid.org') { }
|
|
|
0 |
0 |
elsif ($host eq 'static1.e621.net') { }
|
|
|
0 |
0 |
elsif ($host eq 'files.fellig.org' or $host eq 'thumbnails.fellig.org') { }
|
|
1107
|
0 |
0 |
if (defined(my $v = {$uri->query_form}->{'v'}))
|
|
1111
|
0 |
0 |
if (scalar(my($page) = $path =~ m[^/wiki/(.+)$]u))
|
|
1114
|
0 |
0 |
if ($service->_is_online) { }
|
|
1124
|
0 |
0 |
if (defined $json)
|
|
1126
|
0 |
0 |
if (defined $wikidata_identifier)
|
|
1137
|
0 |
0 |
if ($service->_is_online)
|
|
1139
|
0 |
0 |
$path eq '/' ? :
|
|
|
0 |
0 |
if defined $res->{'id'}{'xkcd-num'}
|
|
1143
|
0 |
0 |
if ($prefix eq "")
|
|
1147
|
0 |
0 |
if ($type =~ /^[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/u) { }
|
|
|
0 |
0 |
elsif (defined $types->{$type}{'alias_for'}) { }
|
|
1157
|
0 |
0 |
$host eq 'uriid.org' ? :
|
|
1159
|
0 |
0 |
if (defined $query{'type'} and length $query{'type'} and defined $query{'id'} and length $query{'id'}) { }
|
|
|
0 |
0 |
elsif (defined $query{'for'} and length $query{'for'}) { }
|
|
1163
|
0 |
0 |
if ($query{'type'} =~ /^[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/u) { }
|
|
|
0 |
0 |
elsif (defined $$types{$query{'type'}}{'alias_for'}) { }
|
|
1175
|
0 |
0 |
if (defined $result)
|
|
1181
|
0 |
0 |
if (scalar @segments == 5 and $segments[0] eq "" and $segments[1] eq "data" and length $segments[2] == 2 and length $segments[3] == 2 and length $segments[4] > 32)
|
|
1191
|
0 |
0 |
if (scalar @segments == 6 and $segments[0] eq "" and $segments[1] eq "data" and $segments[2] eq "preview" and length $segments[3] == 2 and length $segments[4] == 2 and length $segments[5] > 32)
|
|
1203
|
0 |
0 |
if (scalar @segments == 5 and $segments[0] eq "" and $segments[1] eq "v2" and $segments[2] eq "by" and $segments[3] =~ /^[a-z]+-[0-9]+-[0-9]+$/u and length $segments[4] > 32)
|
|
1208
|
0 |
0 |
if (length $hash == int(($segments[3] =~ /^[a-z]+-[0-9]+-([0-9]+)$/u)[0] / 4))
|
|
1229
|
66 |
20 |
if ($as eq 'raw' or $as eq 'string' or $as eq $src_type) { }
|
|
|
20 |
0 |
elsif ($as eq 'Data::Identifier') { }
|
|
|
0 |
0 |
elsif ($as eq __PACKAGE__) { }
|
|
1243
|
10 |
156 |
if (scalar(@_) % 2) { }
|
|
1250
|
10 |
156 |
unless defined $type
|
|
1255
|
66 |
90 |
if (defined $self->{'id'}{$type}) { }
|
|
|
10 |
80 |
elsif (not $opts{'_no_convert'}) { }
|
|
1266
|
0 |
10 |
if $opts{'_no_try'}{$from}
|
|
1270
|
10 |
0 |
if defined $func
|
|
1272
|
10 |
0 |
if defined $self->{'id'}{$type}
|
|
1283
|
0 |
2 |
if ($as eq $source_type) { }
|
|
1286
|
0 |
2 |
if ($as eq 'string' and $source_type eq 'media_subtype') { }
|
|
|
0 |
2 |
elsif ($as eq 'ise' and $source_type eq 'media_subtype') { }
|
|
|
0 |
2 |
elsif ($as eq 'string' and eval {
|
|
|
0 |
2 |
elsif ($as eq __PACKAGE__ and eval {
|
|
|
0 |
2 |
elsif ($as eq __PACKAGE__ and eval {
|
|
|
2 |
0 |
elsif ($as eq 'ise' and eval {
|
|
|
0 |
0 |
elsif ($as eq 'rgb' and eval {
|
|
|
0 |
0 |
elsif (eval {
|
|
|
0 |
0 |
elsif ($as =~ /^[A-Z]/u || $as =~ /::/u and eval {
|
|
1306
|
0 |
0 |
if ($as eq __PACKAGE__ and defined(my $ise = eval {
|
|
1324
|
0 |
6 |
if (defined(my $cb = $info->{'cb'})) { }
|
|
1326
|
0 |
0 |
if ref $value eq "ARRAY"
|
|
1330
|
4 |
2 |
unless (defined $value or ref $value eq "ARRAY")
|
|
1334
|
0 |
4 |
if ref $value eq "ARRAY"
|
|
1337
|
20 |
0 |
unless defined $result and defined $result->{'attributes'}
|
|
1338
|
0 |
0 |
if (defined($value = $result->{'attributes'}{$key}))
|
|
1339
|
0 |
0 |
if (ref $value eq "HASH")
|
|
1342
|
0 |
0 |
if $new = $value->{$language_tag}
|
|
1348
|
0 |
0 |
if (defined $value) { }
|
|
|
0 |
0 |
elsif (ref $default_value eq 'ARRAY') { }
|
|
1349
|
0 |
0 |
if (ref $value eq 'ARRAY') { }
|
|
1364
|
2 |
4 |
if (defined $value)
|
|
1371
|
0 |
2 |
if (ref $value eq "ARRAY" xor $opts{'list'})
|
|
1375
|
0 |
2 |
if (ref $value eq 'ARRAY') { }
|
|
1378
|
0 |
0 |
if defined $cache->{$as}
|
|
1381
|
0 |
0 |
if (builtin::blessed($item)) { }
|
|
1396
|
4 |
0 |
if (exists $opts{'default'})
|
|
1397
|
0 |
4 |
if ($opts{'list'}) { }
|
|
1417
|
0 |
18 |
unless ($key =~ /^[a-z]+-[0-9]+-[1-9][0-9]*$/u)
|
|
1421
|
18 |
0 |
unless (defined $value)
|
|
1426
|
18 |
0 |
unless (defined $value)
|
|
1431
|
94 |
0 |
unless defined $result and defined $result->{'digest'}
|
|
1432
|
0 |
0 |
if defined($value = $result->{'digest'}{$key})
|
|
1436
|
0 |
18 |
if (defined $value)
|
|
1437
|
0 |
0 |
if ($as eq 'hex') { }
|
|
|
0 |
0 |
elsif ($as eq 'binary') { }
|
|
|
0 |
0 |
elsif ($as eq 'base64' or $as eq 'b64') { }
|
|
|
0 |
0 |
elsif ($as eq 'base64_padded') { }
|
|
|
0 |
0 |
elsif ($as eq 'utag') { }
|
|
|
0 |
0 |
elsif ($as eq 'Digest') { }
|
|
1446
|
0 |
0 |
if (defined(my $size = eval {
|
|
1458
|
18 |
0 |
if exists $opts{'default'}
|
|
1467
|
0 |
0 |
unless defined $class
|
|
1469
|
0 |
0 |
if ($class eq 'attribute') { }
|
|
|
0 |
0 |
elsif ($class eq 'digest') { }
|
|
1479
|
0 |
0 |
unless defined $result and defined $result->{'digest'}
|
|
1493
|
0 |
0 |
unless defined $list
|
|
1494
|
0 |
0 |
unless defined $value
|
|
1498
|
0 |
0 |
if (not $ref) { }
|
|
|
0 |
0 |
elsif ($ref eq 'Regexp') { }
|
|
1518
|
0 |
0 |
if ($metatype eq 'id') { }
|
|
|
0 |
0 |
elsif ($metatype eq 'digest') { }
|
|
1520
|
0 |
0 |
if (ref $template eq "ARRAY")
|
|
1526
|
0 |
0 |
if (ref $template eq "ARRAY")
|
|
1531
|
0 |
0 |
if (not defined $t_template and ref $template eq "HASH")
|
|
1539
|
0 |
0 |
unless defined $t_template
|
|
1540
|
0 |
0 |
unless $self->_match_list($t_type, $type)
|
|
1541
|
0 |
0 |
unless $self->_match_list($t_filter, $value)
|
|
1542
|
0 |
0 |
unless $self->_match_list($t_actions, $opts->{'action'})
|
|
1544
|
0 |
0 |
if (builtin::blessed($t_template)) { }
|
|
|
0 |
0 |
elsif ($metatype eq 'id') { }
|
|
|
0 |
0 |
elsif ($metatype eq 'digest') { }
|
|
1545
|
0 |
0 |
if ($t_template->can('process')) { }
|
|
1552
|
0 |
0 |
$t_opts->{'no_escape'} ? :
|
|
1560
|
0 |
0 |
ref $url ? :
|
|
|
0 |
0 |
if defined $url
|
|
1571
|
0 |
0 |
if (scalar @_ == 2) { }
|
|
1584
|
0 |
0 |
if (defined $opts{'action'})
|
|
1592
|
0 |
0 |
if (defined(my $id = eval {
|
|
1597
|
0 |
0 |
if defined $uri
|
|
1607
|
0 |
0 |
if defined $uri
|
|
1610
|
0 |
0 |
if (defined $opts{'action'} and $opts{'action'} eq "info" and $service eq "wikipedia")
|
|
1611
|
0 |
0 |
if (defined(my $sitelinks = eval {
|
|
1613
|
0 |
0 |
if (defined(my $link = $$sitelinks{$language_tag . 'wiki'}))
|
|
1614
|
0 |
0 |
if defined $link->{'url'}
|
|
1620
|
0 |
0 |
if ($service eq "uriid" and defined(my $type = eval {
|
|
1626
|
0 |
0 |
if (defined $opts{'action'} and $opts{'action'} eq "info")
|
|
1639
|
0 |
0 |
unless (defined $base{'ext'})
|
|
1641
|
0 |
0 |
if (defined $media_subtype)
|
|
1651
|
0 |
0 |
if defined $uri
|
|
1656
|
0 |
0 |
if (defined $self->{'url_overrides'} and defined $self->{'url_overrides'}{$service})
|
|
1657
|
0 |
0 |
if (defined(my $action = $opts{'action'}))
|
|
1658
|
0 |
0 |
if (defined(my $url = $self->{'url_overrides'}{$service}{$action}))
|
|
1664
|
0 |
0 |
if exists $opts{'default'}
|
|
1684
|
0 |
0 |
if (defined(my $id_templates = $opts{'id_templates'}))
|
|
1685
|
0 |
0 |
if (scalar @{$id_templates;})
|
|
1691
|
0 |
0 |
if (defined(my $digest_templates = $opts{'digest_templates'}))
|
|
1692
|
0 |
0 |
if (scalar @{$digest_templates;})
|
|
1698
|
0 |
0 |
if (defined(my $id_patterns = $opts{'id_patterns'}))
|
|
1706
|
0 |
0 |
unless keys %res
|
|
1715
|
0 |
0 |
ref $pattern->{'scheme'} ? :
|
|
1716
|
0 |
0 |
if $scheme eq "http"
|
|
1755
|
2 |
0 |
if ($id =~ /^2\.25\.([1-9][0-9]*)$/u)
|
|
1797
|
2 |
2 |
if ($type_name eq "uuid" or $type_name eq "oid" or $type_name eq "uri")
|
|
1804
|
2 |
0 |
if defined $id
|
|
1807
|
0 |
0 |
if exists $opts{'default'}
|
|
1814
|
0 |
0 |
if defined $v
|