Branch Coverage

blib/lib/App/PAIA/Command.pm
Criterion Covered Total %
branch 43 54 79.6


line true false branch
21 6 215 if (@_ > 1) { }
97 118 elsif (not exists $_[0]{$name} and $default) { }
140 2 2 $expires ? :
148 0 4 if $self->expired
150 0 3 if ($scope and $self->scope and not $self->has_scope($scope))
167 4 4 unless ($url =~ /login$/)
175 1 7 if (ref $json and defined $$json{'error'})
177 1 0 if (defined $$json{'error_description'})
183 2 5 if ($$response{'status'} ne '200')
188 0 5 if (my $scopes = $$response{'headers'}{'x-oauth-scopes'})
198 0 4 if ($self->session->purge)
203 0 4 unless my $auth = $self->auth
212 1 3 if (defined $scope)
224 1 0 if defined $self->core
247 1 3 if ($self->not_authentificated($scope))
252 0 1 if ($self->scope and not $self->has_scope($scope))
263 2 1 if defined $self->session->get('access_token')
265 2 1 if defined $self->session->get('scope')
267 2 1 if defined $self->session->get('patron')
282 2 2 if $command ne 'patron'
285 2 2 if (($self->session->get('core') // '') ne $core)
293 2 2 if ($$json{'doc'})
296 1 1 if (@errors)
310 0 1 unless $uri and $uri->scheme
320 0 22 if ($self->app->global_options->version) { }
0 22 elsif ($self->app->global_options->help) { }
329 4 11 if (defined $response and not $self->app->global_options->quiet)