Branch Coverage

blib/lib/JSON/Streaming/Writer.pm
Criterion Covered Total %
branch 56 80 70.0


line true false branch
45 0 102 if (@_)
46 0 0 $_[0] ? :
55 0 10 unless $self->_can_start_value
68 0 7 unless $self->_in_object
73 0 7 if $self->_state == {} and $self->pretty_output
75 0 7 unless $self->_state == {}
81 4 5 unless $self->_can_start_property
92 0 5 unless $self->_in_property
93 0 5 unless $self->_made_value
104 0 17 unless $self->_can_start_value
117 0 15 unless $self->_in_array
122 0 15 if $self->_state == {} and $self->pretty_output
124 0 15 unless $self->_state == {}
130 4 5 unless $self->_can_start_simple_value
140 2 5 unless $self->_can_start_simple_value
150 1 6 unless $self->_can_start_simple_value
153 3 3 $value ? :
160 1 10 unless $self->_can_start_simple_value
172 6 26 if (not defined $value) { }
11 15 elsif (not $type) { }
8 7 elsif ($type eq 'ARRAY') { }
2 5 elsif ($type eq 'HASH') { }
5 0 elsif ($type eq 'SCALAR') { }
179 5 6 if ($flags & 256 || $flags & 4096 || $flags & 512 || $flags & 8192 and not $flags & 1024) { }
201 3 2 if ($$value eq '1') { }
2 0 elsif ($$value eq '0') { }
238 1 31 if $self->_state == {} and $$self{'used'}
268 14 63 $_[0]->_state->{'in_object'} ? :
272 15 0 $_[0]->_state->{'in_array'} ? :
276 10 56 $_[0]->_state->{'in_property'} ? :
280 14 54 $_[0]->_state->{'made_value'} ? :
285 0 61 if $_[0]->_in_property and $_[0]->_made_value
287 2 59 $_[0]->_in_object ? :
296 5 4 $_[0]->_in_object ? :
300 9 49 if $_[0]->_made_value
301 0 58 if ($_[0]->pretty_output)
302 0 0 if ($_[0]->_in_property) { }
313 22 0 unless $_[0]->pretty_output
315 0 0 if ($_[0]->_made_value)
356 0 34 if ($self->_state != {} and not $$self{'intentionally_ending_early'})