| line |
true |
false |
branch |
|
19
|
0 |
0 |
(my $n = $self->base_class || ref $self || $self || '') =~ /(\w+)$/ ? : |
|
25
|
0 |
0 |
ref $def eq 'CODE' ? : |
|
|
0 |
0 |
ref $c->{$name} && exists $c->{$name}{$key} ? : |
|
|
0 |
0 |
exists $$c{"${name}_$key"} ? : |
|
|
0 |
0 |
ref $$c{"${name}_service"} && exists $$c{"${name}_service"}{$key} ? : |
|
|
0 |
0 |
exists $$c{"${name}_service_$key"} ? : |
|
|
0 |
0 |
exists $self->{$key} ? : |
|
34
|
0 |
0 |
$meta->{'log_prefix'} ? : |
|
36
|
0 |
0 |
if $self->_restrict($meth) |
|
41
|
0 |
0 |
if ($enc) { } |
|
42
|
0 |
0 |
if $trp eq "json" |
|
44
|
0 |
0 |
if $trp and $trp ne "json" |
|
61
|
0 |
0 |
if $begin |
|
64
|
0 |
0 |
ref $resp eq 'HASH' && exists $resp->{'_utf8_encoded'} ? : |
|
|
0 |
0 |
if ref $resp eq 'HASH' && exists $resp->{'_utf8_encoded'} ? delete $resp->{'_utf8_encoded'} : $enc |
|
70
|
0 |
0 |
if __PACKAGE__->SUPER::can($meth) |
|
76
|
31 |
0 |
$Net::Respite::Base::AUTOLOAD =~ /::(\w+)$/ ? : |
|
77
|
0 |
31 |
unless builtin::blessed($self) |
|
79
|
0 |
31 |
if $self->{'_autoload'}{$meth} > $max_recurse |
|
90
|
0 |
9 |
if ${"${ref}::api_meta";} |
|
91
|
0 |
0 |
$ref eq __PACKAGE__ ? : |
|
98
|
0 |
0 |
if (UNIVERSAL::isa($d, 'HASH')) { } |
|
|
0 |
0 |
elsif (UNIVERSAL::isa($d, 'ARRAY')) { } |
|
99
|
0 |
0 |
ref $v ? : |
|
|
0 |
0 |
if ref $v ? _encode_utf8_recurse($v) : $v and utf8::is_utf8($v) |
|
101
|
0 |
0 |
ref $v ? : |
|
|
0 |
0 |
if ref $v ? _encode_utf8_recurse($v) : $v and utf8::is_utf8($v) |
|
108
|
0 |
0 |
if $seen->{$d}++ |
|
109
|
0 |
0 |
if (UNIVERSAL::isa($d, 'HASH')) { } |
|
|
0 |
0 |
elsif (UNIVERSAL::isa($d, 'ARRAY')) { } |
|
110
|
0 |
0 |
ref $v ? : |
|
|
0 |
0 |
if ref $v ? _decode_utf8_recurse($v, $seen) : $v and not utf8::is_utf8($v) |
|
112
|
0 |
0 |
ref $v ? : |
|
|
0 |
0 |
if ref $v ? _decode_utf8_recurse($v, $seen) : $v and not utf8::is_utf8($v) |
|
121
|
3 |
0 |
unless ($val_hash) |
|
122
|
0 |
3 |
unless my $code = $self->can("${sub}__meta") |
|
125
|
0 |
0 |
if (my $ra = $meta->{'requires_admin'} and eval {
do {
$self->api_meta->{'enforce_requires_admin'}
}
} || do {
my $e = $@;
die $e if $e and !ref($e) || $e->{'type'} ne 'no_meta';
0
}) |
|
126
|
0 |
0 |
ref $ra eq 'HASH' ? : |
|
|
0 |
0 |
ref $ra eq 'CODE' ? : |
|
133
|
1 |
0 |
$args->{'_no_trace'} ? : |
|
137
|
0 |
0 |
$_[0]{'base'} ? : |
|
|
0 |
1 |
unless $_[0]{'api_ip'} |
|
138
|
0 |
1 |
$_[0]{'base'} ? : |
|
|
1 |
0 |
unless $_[0]{'api_brand'} |
|
139
|
0 |
0 |
$_[0]{'base'} ? : |
|
|
0 |
0 |
unless $_[0]{'remote_ip'} |
|
140
|
0 |
0 |
$_[0]{'base'} ? : |
|
|
0 |
0 |
unless $_[0]{'remote_user'} |
|
142
|
0 |
0 |
$_[0]{'base'} ? : |
|
|
0 |
0 |
unless $_[0]{'admin_user'} |
|
144
|
0 |
1 |
$_[0]{'base'} ? : |
|
|
1 |
0 |
unless $_[0]{'transport'} |
|
145
|
0 |
0 |
if (exists $_[0]{'is_server'}) { } |
|
147
|
0 |
0 |
eval {
do {
(shift())->admin_user
}
} ? : |
|
149
|
0 |
1 |
$_[0]->transport =~ /^(?:cmdline|gui)$/ ? : |
|
154
|
0 |
0 |
unless ($self->{'base'}) |
|
155
|
0 |
0 |
if $self->{'called_from_base'} |
|
157
|
0 |
0 |
if ref $self eq $class |
|
159
|
0 |
0 |
unless eval {
do {
require $file
}
} |
|
173
|
7 |
6 |
unless $meta->{'methods'} |
|
174
|
31 |
9 |
if ($meth) { } |
|
|
9 |
0 |
elsif (not $cache->{'--load--'}{'builtin'}++) { } |
|
175
|
23 |
8 |
if exists $cache->{$meth} |
|
176
|
0 |
8 |
if exists $cache->{$meth} |
|
178
|
0 |
8 |
if $code = $self->can($meth) and $code ne \&{'Net::Respite::Base' . "::$meth";} |
|
179
|
3 |
5 |
if $code = $self->can("__$meth") |
|
184
|
7 |
9 |
if $pkg ne __PACKAGE__ |
|
186
|
148 |
329 |
unless defined &{"${pkg}::$meth";} |
|
187
|
297 |
32 |
$pkg eq __PACKAGE__ ? : |
|
|
275 |
54 |
if $pkg eq __PACKAGE__ ? !($meth =~ /^__/) : defined &{'Net::Respite::Base' . "::$meth";} |
|
188
|
0 |
54 |
if $pkg =~ /^_[a-z]/ |
|
189
|
0 |
9 |
unless $meth =~ /__meta$/ or $meth =~ /^__/ or defined &{"${pkg}::${meth}__meta";} |
|
198
|
4 |
11 |
if $type eq "lib_dirs" |
|
201
|
20 |
7 |
if ref $opt ne "HASH" |
|
202
|
0 |
4 |
$opt->{'full_name'} ? : |
|
|
6 |
4 |
!($meth =~ /^${ns}_*(\w+)$/) ? : |
|
|
17 |
10 |
!$meth ? : |
|
204
|
1 |
20 |
unless ($pkg->can("new")) |
|
206
|
0 |
1 |
unless (eval {
do {
require ($opt->{'file'} ||= $file)
}
}) |
|
210
|
1 |
0 |
if $opt->{'file'} ne $file |
|
215
|
19 |
2 |
$qr eq '1' || $qr eq '*' ? : |
|
|
21 |
0 |
if $qr and not ref $qr |
|
218
|
58 |
53 |
unless defined &{"${pkg}::$meth";} |
|
219
|
0 |
53 |
$pkg eq __PACKAGE__ ? : |
|
|
4 |
49 |
if $pkg eq __PACKAGE__ ? !($meth =~ /^__/) : defined &{'Net::Respite::Base' . "::$meth";} |
|
220
|
0 |
49 |
if $meth =~ /^_[a-z]/ |
|
221
|
0 |
49 |
if $qr and not $meth =~ /$qr/ |
|
222
|
16 |
10 |
unless $meth =~ /__meta$/ or $meth =~ /^__/ or defined &{"${pkg}::${meth}__meta";} |
|
224
|
33 |
0 |
unless $opt->{'full_name'} or $name =~ /^\Q$ns\E_/ |
|
231
|
0 |
1 |
unless $ok |
|
234
|
21 |
0 |
$dt eq 'cache' ? : |
|
|
1 |
21 |
$dt eq 'morph' ? : |
|
|
9 |
22 |
$dt eq 'new' ? : |
|
236
|
2 |
0 |
if ($meta->{'allow_nested'} || $opt->{'allow_nested'} and defined &{"${pkg}::api_meta";} and $pkg->can("find_method")) |
|
239
|
0 |
18 |
if $qr and not $meth =~ /$qr/ |
|
240
|
18 |
0 |
!($opt->{'full_name'} || $meth =~ /^\Q$ns\E_/) ? : |
|
244
|
4 |
0 |
if $meth and $cache->{$meth} |
|
248
|
1 |
9 |
if $meth |
|
254
|
0 |
3 |
if ($NS eq 1) |
|
255
|
0 |
0 |
if ref $self eq __PACKAGE__ |
|
257
|
0 |
0 |
unless (my $dir = $INC{$file} || '') =~ s/\.pm$// |
|
262
|
0 |
3 |
unless (opendir my $dh, $dir) |
|
264
|
3 |
0 |
if ref $opt ne "HASH" |
|
265
|
0 |
3 |
$opt->{'pkg_prefix'} ? : |
|
267
|
9 |
3 |
unless $sub =~ /^([a-zA-Z]\w*)\.pm$/ |
|
269
|
0 |
3 |
if $opt->{'pkg_exclude'} and $pkg =~ /$opt->{'pkg_exclude'}/ |
|
296
|
2 |
0 |
!$args->{'method'} ? : |
|
299
|
22 |
14 |
unless $meth =~ /^(\w+)__meta$/ |
|
301
|
0 |
14 |
if $qr and not $name =~ /$qr/ |
|
303
|
0 |
0 |
if $ENV{'REQUEST_METHOD'} and $meta->{'no_listing'} |
|
304
|
0 |
14 |
$meta->{'no_listing'} ? : |
|
|
0 |
14 |
$args->{'meta'} ? : |
|
326
|
0 |
1 |
if $args->{'sleep'} |
|
327
|
0 |
1 |
if $args->{'fail'} |
|
335
|
0 |
1 |
$args->{'test_auth'} && $self->require_admin ? : |