Branch Coverage

blib/lib/Mojo/Parameters.pm
Criterion Covered Total %
branch 51 52 98.0


line true false branch
13 314 145 @_ == 1 ? :
17 48 286 if (ref $value eq 'ARRAY') { }
284 2 elsif (defined $value) { }
30 470 1199 if (exists $self->{'charset'})
31 192 1477 if (defined $self->{'string'}) { }
43 316 855 if $pairs->[$i] eq $name
52 5 20 @_ == 1 ? :
55 25 5 defined $value ? :
63 71 5135 @_ > 1 ? :
69 5 8380 if (@_)
76 282 8098 if (defined(my $str = delete $self->{'string'}))
78 1 281 unless length $str
82 0 439 unless $pair =~ /^([^=]+)(?:=(.*))?$/u
88 436 3 if $charset
90 436 3 if $charset
101 2835 35 unless @_
103 7 28 ref $_[0] eq 'ARRAY' ? :
110 49 353 if @_ > 1
121 18 93 $pairs->[$i] eq $name ? :
134 37 174 if (exists $hash{$name}) { }
135 32 5 if ref $hash{$name} ne "ARRAY"
151 239 2566 if (defined(my $str = $self->{'string'}))
152 238 1 if $charset
158 2462 104 unless @$pairs
164 211 5 if $charset
166 211 5 if $charset