Branch Coverage

blib/lib/Protocol/ACME.pm
Criterion Covered Total %
branch 55 126 43.6


line true false branch
331 0 6 if (ref $_[0] eq 'HASH') { }
342 6 0 if exists $args->{'host'}
343 0 6 if exists $args->{'ua'}
344 4 2 if exists $args->{'openssl'}
345 2 4 if exists $args->{'debug'}
346 1 5 exists $args->{'loglevel'} ? :
347 0 6 if exists $args->{'mailto'}
349 2 4 if ($self->{'debug'})
354 6 0 unless (exists $self->{'ua'})
359 0 6 unless (exists $self->{'host'})
371 4 2 if (exists $args->{'account_key'})
386 2 0 if (scalar @_ == 1)
416 4 24 if (not ref $key) { }
8 16 elsif (ref $key eq 'SCALAR') { }
420 0 4 unless (-f $key)
434 8 20 if ($args{'filename'})
437 0 8 unless ($args{'buffer'})
443 0 28 unless ($args{'buffer'})
448 20 8 unless ($args{'format'})
450 12 8 Protocol::ACME::Utils::looks_like_pem($args{'buffer'}) ? :
455 12 16 if ($args{'format'} eq 'DER')
460 15 13 if (exists $self->{'openssl'}) { }
473 0 13 if ($@)
484 2 11 if ($@)
490 0 25 unless ($key)
518 0 4 if ($resp->{'status'} != 200)
542 0 4 if (exists $args{'mailto'}) { }
0 4 elsif (exists $self->{'contact'}{'mailto'}) { }
559 3 0 if ($resp->{'status'} == 409) { }
0 0 elsif ($resp->{'status'} == 201) { }
570 2 0 if ($resp->{'status'} == 202) { }
612 0 0 unless $pem
645 2 0 if (exists $self->{'reg'}{'agreement'})
666 0 0 if ($resp->{'status'} == 202) { }
685 0 0 unless ($cert)
699 0 0 if ($resp->{'status'} != 200)
721 0 0 if ($resp->{'status'} == 201) { }
748 0 0 if ($_->{'type'} eq 'http-01')
762 0 0 if ($ret == 0) { }
795 0 0 if ($self->{'content'}{'status'} eq 'pending') { }
0 0 elsif ($self->{'content'}{'status'} eq 'invalid') { }
829 0 0 if (not ref $csr) { }
0 0 elsif (ref $csr eq 'SCALAR') { }
842 0 0 if ($args{'filename'})
845 0 0 unless ($args{'buffer'})
851 0 0 unless ($args{'buffer'})
856 0 0 unless ($args{'format'})
858 0 0 Protocol::ACME::Utils::looks_like_pem($args{'buffer'}) ? :
861 0 0 $args{'format'} eq 'DER' ? :
869 0 0 if ($resp->{'status'} != 201)
876 0 0 if exists $links->{'up'}
877 0 0 if exists $resp->{'headers'}{'location'}
888 0 0 unless (exists $self->{'links'}{'chain'})
895 0 0 if ($resp->{'status'} != 200)
922 4 0 unless $nodecode
945 5 0 unless $nodecode
968 0 8 unless open my $fh, '<', $filename
970 0 8 unless sysread $fh, my $content, -s $fh
981 0 2 unless $arrayref
983 0 2 unless (ref $arrayref)
994 4 0 if ($url and $rel) { }
1012 28 88 if (UNIVERSAL::isa($bigint, 'Math::BigInt')) { }
1016 14 14 if (length($hex) % 2)