line |
true |
false |
branch |
53
|
13 |
0 |
unless $caller->isa($class)
|
62
|
20 |
17 |
if $new
|
63
|
17 |
20 |
defined wantarray ? :
|
74
|
13 |
4 |
if $config
|
76
|
0 |
17 |
if ($self->{'app'}) { }
|
79
|
0 |
0 |
unless ref $app
|
81
|
0 |
0 |
unless $ua
|
88
|
16 |
1 |
unless (length $self->server_url)
|
100
|
0 |
17 |
if (eval {
do {
require Clustericious::Client::Local
}
})
|
112
|
0 |
0 |
unless @_ > 0
|
114
|
0 |
0 |
unless ($remote)
|
139
|
0 |
0 |
@_ ? :
|
|
0 |
0 |
@_ == 2 ? :
|
147
|
1 |
1 |
unless $self->res
|
148
|
1 |
1 |
unless $self->res
|
149
|
0 |
1 |
if $self->res->code and $self->res->is_success
|
151
|
0 |
1 |
if (defined $error->{'advice'}) { }
|
|
1 |
0 |
elsif (defined $error->{'code'}) { }
|
168
|
3 |
0 |
unless $c->tx or $c->res
|
169
|
0 |
0 |
if $c->tx and $c->tx->error
|
170
|
0 |
0 |
if $c->res and not $c->res->is_success
|
189
|
0 |
17 |
ref $_[0] eq 'ARRAY' ? :
|
190
|
0 |
17 |
ref $_[-1] eq 'SCALAR' ? :
|
204
|
0 |
17 |
if ($objclass)
|
206
|
0 |
0 |
if ($@)
|
207
|
0 |
0 |
unless $@ =~ /Can't locate/i
|
217
|
0 |
7 |
if $objclass
|
240
|
0 |
9 |
unless ref $args eq 'ARRAY'
|
253
|
0 |
1 |
ref $_[-1] eq 'SCALAR' ? :
|
260
|
1 |
0 |
if ($@)
|
261
|
0 |
1 |
unless $@ =~ /Can't locate/i
|
264
|
1 |
0 |
unless $objclass->can('new')
|
300
|
11 |
0 |
if ref $_[0] eq 'Clustericious::Client::Meta::Route'
|
304
|
0 |
11 |
if $meta and $meta->get('auto_failover')
|
306
|
11 |
0 |
if $self->server_url and not $url =~ /^http/
|
307
|
0 |
11 |
if $self->server_url eq 'http://0.0.0.0'
|
313
|
0 |
11 |
if ($method eq 'POST' and grep /^--/, @args)
|
318
|
11 |
0 |
unless ref $url
|
333
|
0 |
1 |
unless $key
|
341
|
4 |
7 |
if ($meta and my $arg_spec = $meta->get('args'))
|
344
|
13 |
2 |
if (my $modifies_url = $_->{'modifies_url'})
|
347
|
13 |
0 |
($a = $gen_url_modifier{$modifies_url}) ? :
|
|
0 |
13 |
ref $modifies_url eq 'CODE' ? :
|
350
|
2 |
13 |
if (my $modifies_payload = $_->{'modifies_payload'})
|
354
|
2 |
0 |
($a = $gen_payload_modifier{$modifies_payload}) ? :
|
|
0 |
2 |
ref $modifies_payload eq 'CODE' ? :
|
360
|
1 |
16 |
if (ref $arg eq 'HASH') { }
|
|
0 |
16 |
elsif (ref $arg eq 'CODE') { }
|
|
13 |
3 |
elsif (my $code = $url_modifier{$arg}) { }
|
|
2 |
1 |
elsif (my $code2 = $payload_modifer{$arg}) { }
|
|
0 |
1 |
elsif ($method eq 'GET' and $arg =~ s/^--//) { }
|
|
0 |
1 |
elsif ($method eq 'GET' and $arg =~ s/^-//) { }
|
|
0 |
1 |
elsif ($method eq 'POST' and not ref $arg) { }
|
362
|
0 |
1 |
if $meta and $meta->get('skip_existing')
|
377
|
0 |
0 |
if (ref $value eq 'ARRAY')
|
383
|
0 |
0 |
if $args[0] and ref $args[0] eq 'HASH'
|
388
|
0 |
0 |
unless $url->is_abs or $self->{'app'}
|
389
|
0 |
11 |
unless $url =~ /^http/i
|
391
|
0 |
11 |
if $self->userinfo
|
397
|
1 |
10 |
if ($body and ref $body eq 'HASH' or ref $body eq 'ARRAY')
|
403
|
0 |
11 |
if $cb
|
413
|
0 |
0 |
if (($tx->res->code || 0) == 401 and $auth_header = $tx->res->headers->www_authenticate and not $url->userinfo and $self->_has_auth || $self->_can_auth)
|
418
|
0 |
0 |
$self->_has_auth ? :
|
419
|
0 |
0 |
$meta ? :
|
422
|
6 |
5 |
if ($res->is_success)
|
428
|
4 |
2 |
$content_type =~ qr"application/json" ? :
|
|
0 |
6 |
$method =~ /HEAD|DELETE/ ? :
|
439
|
1 |
4 |
if ($code)
|
440
|
1 |
0 |
if ($code == 404) { }
|
443
|
1 |
0 |
unless $ENV{'ACPS_SUPPRESS_404'} and $url =~ /$ENV{'ACPS_SUPPRESS_404'}/
|
446
|
0 |
0 |
if $res->body
|
449
|
0 |
0 |
if $brief
|
455
|
4 |
0 |
unless ($auto_failover)
|
457
|
0 |
4 |
if $res->body
|
461
|
0 |
0 |
unless (@$failover_urls)
|
471
|
0 |
0 |
if $got
|
488
|
0 |
0 |
if ($tx->res->is_success) { }
|
490
|
0 |
0 |
$tx->res->headers->content_type =~ qr"application/json" ? :
|
493
|
0 |
0 |
$body ? :
|
505
|
0 |
16 |
unless ref $url eq 'Mojo::URL'
|
506
|
16 |
0 |
unless $url->userinfo
|
524
|
0 |
24 |
if (my $remote = $self->_remote)
|
541
|
3 |
21 |
unless (defined $self->{'_base_config'})
|
557
|
0 |
0 |
$config->username('default', '') && password('default', '') ? :
|
563
|
0 |
0 |
-t STDIN ? :
|
570
|
0 |
0 |
unless defined $realm
|
571
|
0 |
0 |
if exists $self->_cache->{$host}{$realm}
|
584
|
10 |
13 |
if ($route_name =~ /::([^:]+)$/)
|