Branch Coverage

lib/Text/vCard/Node.pm
Criterion Covered Total %
branch 97 102 95.1


line true false branch
72 1 320 unless defined $$conf{'fields'}
73 1 319 unless ref $$conf{'fields'} eq 'ARRAY'
80 312 6 if defined $$conf{'node_type'}
82 310 8 if defined $$conf{'group'}
92 315 3 if (defined $$conf{'data'})
96 139 176 if (defined $$conf{'data'}{'params'})
106 175 17 if (defined $value)
127 279 36 if (defined $$conf{'data'}{'value'})
131 9 270 if ($self->is_type('q') or $self->is_type('quoted-printable'))
140 1 278 if ($self->is_type('b') or $self->is_type('base64')) { }
160 4 274 if (defined $$self{'node_type'} and $$self{'node_type'} eq 'ORG') { }
273 1 elsif (@elements <= @{$$self{'field_order'};}) { }
166 3 1 if scalar @unescaped > 0
224 1 3 if $val and ref $val eq 'ARRAY'
225 3 1 if defined $$self{'unit'}
247 1 39 unless defined $$self{'params'}
250 44 12 if $value and $value eq 'type'
252 1 38 wantarray ? :
270 317 2778 if (defined $$self{'params'} and exists $$self{'params'}{lc $type})
304 13 26 if (defined $params and (defined $$params{'1'} and $$params{'1'} eq 'pref') or defined $$params{'pref'})
327 2 2 unless (defined $$self{'params'})
333 1 3 if (ref $type eq 'ARRAY') { }
358 1 4 unless defined $$self{'params'}
360 2 2 if (ref $type eq 'ARRAY') { }
363 2 1 if (exists $$self{'params'}{lc $t})
370 1 1 if (exists $$self{'params'}{lc $type})
396 16 505 if (my $val = shift())
399 51 470 if defined $$self{'group'}
419 13 1 if (defined $$self{$_}) { }
420 0 13 if (ref $$self{$_} eq 'ARRAY') { }
448 8 165 if $self->group
450 82 91 if $self->_params
467 0 0 if $$self{'encoding_out'} ne 'none' and not $$self{'encoding_out'} =~ /UTF-8/i and not $self->is_type('b') and not $self->is_type('base64')
476 164 91 @params ? :
499 1 353 if $self->is_type('b') or $self->is_type('base64')
518 22 151 if $$self{'encoding_out'} eq 'none'
524 22 151 if $$self{'encoding_out'} eq 'none'
530 22 311 if $$self{'encoding_out'} eq 'none'
536 0 0 if $$self{'encoding_out'} eq 'none'
558 22 151 unless $$self{'encoding_out'} =~ /UTF-8/i
561 10 141 if ($self->is_type('q') or $self->is_type('quoted-printable'))
582 142 9 if $gcs->length <= $max
600 671 1809 if ($first_max and $bytes <= $first_max)
606 1776 33 if ($bytes <= $max)
619 9 24 if ($start + $len - 1 >= $gcs->length)
650 10 163 if ($self->is_type('q') or $self->is_type('quoted-printable')) { }
1 162 elsif ($self->is_type('b') or $self->is_type('base64')) { }
697 13 353 unless defined(my $field_value = $$self{$field_name})
700 1 352 ref $field_value eq 'ARRAY' ? :
729 1 317 unless defined $_[0]{'field_lookup'}{$name}
732 39 278 if ($_[1])