Branch Coverage

blib/lib/Net/PMP/Client.pm
Criterion Covered Total %
branch 0 110 0.0


line true false branch
64 0 0 if ($self->debug)
186 0 0 if (not $refresh and $self->{'_token'} and $self->{'_token'}->expires_in > $warning_ttl)
191 0 0 if ($self->{'_last_token_ts'})
199 0 0 if ($self->{'_token'} and $self->{'_token'}->expires_in <= $warning_ttl)
200 0 0 if ($self->debug)
214 0 0 unless ($home_doc)
228 0 0 if ($response->code != 200)
262 0 0 if ($response->code != 204)
309 0 0 unless my $user = delete $params{'username'}
310 0 0 unless my $pass = delete $params{'password'}
316 0 0 if (exists $params{$p} and defined $params{$p} and length $params{$p})
325 0 0 if ($post_params{'expires'})
332 0 0 if ($self->debug)
347 0 0 if ($response->code != 200)
383 0 0 unless my $user = $params{'username'}
384 0 0 unless my $pass = $params{'password'}
385 0 0 unless my $client_id = $params{'client_id'}
396 0 0 if ($response->code != 204)
412 0 0 unless my $guid = shift()
425 0 0 unless my $profile = shift()
437 0 0 unless my $schema = shift()
456 0 0 unless my $uri = shift()
463 0 0 if ($token)
471 0 0 if ($response->code == 401)
482 0 0 if $self->debug
487 0 0 if ($response->code == 404)
491 0 0 if ($response->code != 200 or not $response->decoded_content)
507 0 0 unless ($self->{'_home_doc'})
523 0 0 if $self->{'_doc_edit_link'}
543 0 0 unless my $doc = shift()
544 0 0 unless (&blessed($doc) and $doc->isa('Net::PMP::CollectionDoc'))
551 0 0 if ($self->debug)
563 0 0 if ($response->code == 401)
574 0 0 if $self->debug
579 0 0 unless ($response->code =~ /^20[02]$/ and $response->decoded_content)
601 0 0 unless my $doc = shift()
602 0 0 unless (&blessed($doc) and $doc->isa('Net::PMP::CollectionDoc'))
615 0 0 if ($response->code == 401)
625 0 0 if $self->debug
630 0 0 if ($response->code != 204)
658 0 0 if ($uri eq $self->host and $self->{'_home_doc'})
666 0 0 if $self->debug
667 0 0 if (not $response and $attempts < $tries)
668 0 0 if $self->debug
674 0 0 unless $response
678 0 0 if ($self->last_response->content_type eq 'application/schema+json')
695 0 0 unless my $guid = shift()
714 0 0 unless my $opts = shift()
720 0 0 if ($ENV{'PMP_CLIENT_DEBUG'} and $ENV{'PMP_APPEND_RANDOM_STRING'})
739 0 0 unless my $doc = shift()
740 0 0 if (&blessed($doc) and $doc->isa('Net::PMP::Profile'))
743 0 0 unless (&blessed($doc) and $doc->isa('Net::PMP::CollectionDoc'))
748 0 0 unless ($doc->get_guid)
753 0 0 unless ($doc->href)
758 0 0 if $self->debug