Branch Coverage

lib/HTTP/Promise/Headers/Generic.pm
Criterion Covered Total %
branch 72 164 43.9


line true false branch
55 0 10 unless $self->_load_class("HTTP::Promise::Headers")
57 10 0 if (defined $new_fname)
61 10 0 wantarray ? :
70 2 0 if ($fname =~ /[^\x00-\x7f]/)
72 0 2 unless defined $lang
85 0 48 unless $hv
92 0 0 unless $self->_load_class("Module::Generic::HeaderValue")
104 0 5 unless $self->_load_class("Module::Generic::HeaderValue")
112 0 35 unless defined $o
120 0 87 unless defined $this and length "$this"
121 0 87 unless $self->_load_class("Module::Generic::HeaderValue")
134 0 10 unless defined $str and length "$str"
148 0 35 unless $element
204 0 15 if $all->is_empty
215 0 5 unless defined $this and length "$this"
217 1 4 if ($self->_is_a($this, 'HTTP::Promise::Field::QualityValue')) { }
220 1 0 if defined $pos
226 4 3 if $_->element eq $this
236 0 0 unless defined $this and length "$this"
237 0 0 if not $self->_is_array($this) and !ref($this) || overload::Method($this, '""')
238 0 0 unless $self->_is_array($this)
240 0 0 unless scalar @$ordered
241 0 0 $self->can('sort') ? :
247 0 0 if ($e->element->index('*') != -1) { }
250 0 0 unless defined $wildcard_ok
251 0 0 unless $wildcard_ok->is_empty
257 0 0 if ($e_lc eq $ordered->[$i])
276 0 0 unless @_ == 3
277 0 0 if $acceptable->index("*") == -1
278 0 0 unless $self->_is_array($proposals)
279 0 0 unless $self->_is_array($original)
281 0 0 if ($acceptable->index('/') != -1) { }
288 0 0 if ($main eq '*') { }
0 0 elsif ($main eq $this_main) { }
290 0 0 if ($sub eq '*') { }
296 0 0 if $this_sub eq $sub
301 0 0 if ($sub eq '*') { }
307 0 0 if $this_sub eq $sub
325 0 1 if ($self->_is_a($this, 'HTTP::Promise::Field::QualityValue')) { }
334 1 1 if ($all->[$i]->element eq "$this")
348 1 0 unless exists $opts->{'asc'}
352 0 1 $opts->{'asc'} ? :
362 0 0 if (@_)
365 0 0 if ($v) { }
384 0 89 unless scalar @_ or $hv
385 0 107 unless $hv
386 18 89 if (@_)
398 0 0 if (@_) { }
420 10 18 if $self->can("_needs_quotes")
425 0 98 unless (exists $props->{$_})
433 4 67 $quotes->{$_} ? :
4 67 $quotes->{$_} ? :
71 27 defined $props->{$_} ? :
446 9 23 if (@_) { }
449 4 5 if (defined $pos) { }
451 1 3 if (defined $bool and $bool) { }
467 5 0 if (defined $bool and $bool) { }
483 22 1 defined $pos ? :
492 2 16 if (@_)
495 0 2 if defined $v and not $self->_is_integer($v)
507 4 72 if ref $_[-1] eq "HASH"
513 4 72 if (@_) { }
516 2 2 unless (defined $v)
518 2 0 if defined $pos
523 2 0 if (not defined $pos) { }
525 2 0 if not $opts->{'maybe_boolean'} or $opts->{'maybe_boolean'} and $v
526 0 2 if (exists $opts->{'maybe_boolean'} and $opts->{'maybe_boolean'}) { }
528 0 0 if ($v == 1) { }
0 0 elsif (not $v) { }
548 0 0 if (exists $opts->{'maybe_boolean'} and $opts->{'maybe_boolean'}) { }
550 0 0 if (not $v) { }
0 0 elsif ($v == 1) { }
570 1 1 if ($opts->{'needs_quotes'} and $self->can("_needs_quotes"))
578 72 0 if (defined $pos)
583 2 0 defined $pos ? :
2 70 $opts->{'maybe_boolean'} ? :
597 0 14 if (@_) { }
607 3 11 unless defined $v and length "$v"
618 0 0 if (@_)
653 23 44 unless defined $val and length "$val"
661 0 35 unless defined $elem and length "$elem"
663 0 35 unless $self->SUPER::init(@_)