Branch Coverage

blib/lib/Net/Gnats/PR.pm
Criterion Covered Total %
branch 76 92 82.6


line true false branch
56 18 0 unless %options
76 0 0 if defined $$self{'fields'}
155 124 98 unless (_is_header_field($field->name))
169 178 117 if defined $$self{'fields'}{$fieldname}
185 0 0 if $field =~ qr/^$fieldname/
210 0 4 unless defined $self->get_field($name)
211 0 4 unless $self->setField($name, $value, $reason_value)
215 2 2 if ($f->schema->requires_change_reason)
239 29 22 unless defined $self->get_field($name)
242 5 17 if ($f->schema->requires_change_reason)
243 1 4 unless defined $reason_value
280 1 2 if defined $self->get_field('Number') and not defined $force
285 0 2 if $command->is_ok == 0
289 1 1 if ($self->get_field('Number')) { }
325 0 0 if $person
367 90 97 if (_is_header_line($line))
374 32 65 unless (defined $found[0])
383 1 64 if ($schema_found == 0)
411 0 195 unless (defined $line)
420 29 302 if $line =~ /^${\'From';}:/
421 29 273 if $line =~ /^${\'Reply-To';}:/
422 29 244 if $line =~ /^${\'To';}:/
423 29 215 if $line =~ /^${\'Cc';}:/
424 29 186 if $line =~ /^${\'Subject';}:/
425 29 157 if $line =~ /^${\'X-Send-Pr-Version';}:/
426 0 157 if $line =~ /^${\'X-GNATS-Notify';}:/
432 14 208 if $name eq 'From'
433 14 194 if $name eq 'Reply-To'
434 14 180 if $name eq 'To'
435 14 166 if $name eq 'Cc'
436 14 152 if $name eq 'Subject'
437 14 138 if $name eq 'X-Send-Pr-Version'
438 14 124 if $name eq 'X-GNATS-Notify'
444 14 130 if $line =~ /^${\'From';}:/
477 22 173 if $line eq '' or $line eq '.'
480 0 173 if not defined $name and $content eq ''
482 14 159 if (defined $name and _is_first_line($name . ':'))
486 84 89 if (defined $name and _is_header_line($name . ':'))
495 60 29 if (defined $name) { }
508 0 14 unless defined $pr->get_field('Reply-To')->value
512 14 0 unless (defined $pr->get_field('X-GNATS-Notify'))
518 11 3 unless ($pr->get_field($UNFORMATTED_FIELD))
526 12 2 if scalar @attachments == 0
601 7 61 if ($fn eq 'Unformatted')
605 14 47 if ($field->schema->type eq 'MultiText') { }
617 0 61 if ($pr->get_field($field->name . '-Changed-Why'))