Branch Coverage

blib/lib/Protocol/ACME.pm
Criterion Covered Total %
branch 51 122 41.8


line true false branch
334 0 6 if (ref $_[0] eq 'HASH') { }
345 6 0 if exists $args->{'host'}
346 0 6 if exists $args->{'ua'}
347 4 2 if exists $args->{'openssl'}
348 2 4 if exists $args->{'debug'}
349 1 5 exists $args->{'loglevel'} ? :
350 0 6 if exists $args->{'mailto'}
352 2 4 if ($self->{'debug'})
357 6 0 unless (exists $self->{'ua'})
362 0 6 unless (exists $self->{'host'})
374 4 2 if (exists $args->{'account_key'})
389 0 0 if (scalar @_ == 1)
419 4 24 if (not ref $key) { }
8 16 elsif (ref $key eq 'SCALAR') { }
432 8 20 if ($args{'filename'})
435 0 8 unless ($args{'buffer'})
441 0 28 unless ($args{'buffer'})
446 20 8 unless ($args{'format'})
448 12 8 Protocol::ACME::Utils::looks_like_pem($args{'buffer'}) ? :
453 12 16 if ($args{'format'} eq 'DER')
458 15 13 if (exists $self->{'openssl'}) { }
471 0 13 if ($@)
481 0 25 unless ($key)
509 0 4 if ($resp->{'status'} != 200)
533 0 4 if (exists $args{'mailto'}) { }
0 4 elsif (exists $self->{'contact'}{'mailto'}) { }
550 3 0 if ($resp->{'status'} == 409) { }
0 0 elsif ($resp->{'status'} == 201) { }
561 2 0 if ($resp->{'status'} == 202) { }
603 0 0 unless $pem
636 2 0 if (exists $self->{'reg'}{'agreement'})
657 0 0 if ($resp->{'status'} == 202) { }
676 0 0 unless ($cert)
690 0 0 if ($resp->{'status'} != 200)
712 0 0 if ($resp->{'status'} == 201) { }
739 0 0 if ($_->{'type'} eq 'http-01')
753 0 0 if ($ret == 0) { }
786 0 0 if ($self->{'content'}{'status'} eq 'pending') { }
0 0 elsif ($self->{'content'}{'status'} eq 'invalid') { }
820 0 0 if (not ref $csr) { }
0 0 elsif (ref $csr eq 'SCALAR') { }
833 0 0 if ($args{'filename'})
836 0 0 unless ($args{'buffer'})
842 0 0 unless ($args{'buffer'})
847 0 0 unless ($args{'format'})
849 0 0 Protocol::ACME::Utils::looks_like_pem($args{'buffer'}) ? :
852 0 0 $args{'format'} eq 'DER' ? :
860 0 0 if ($resp->{'status'} != 201)
867 0 0 if exists $links->{'up'}
868 0 0 if exists $resp->{'headers'}{'location'}
879 0 0 unless (exists $self->{'links'}{'chain'})
886 0 0 if ($resp->{'status'} != 200)
913 4 0 unless $nodecode
936 5 0 unless $nodecode
959 0 8 unless open my $fh, '<', $filename
961 0 8 unless sysread $fh, my $content, -s $fh
972 0 2 unless $arrayref
974 0 2 unless (ref $arrayref)
985 4 0 if ($url and $rel) { }
1003 28 88 if (UNIVERSAL::isa($bigint, 'Math::BigInt')) { }
1007 14 14 if (length($hex) % 2)