Branch Coverage

blib/lib/Text/FormBuilder.pm
Criterion Covered Total %
branch 18 96 18.7


line true false branch
58 0 0 unless $options
59 0 0 if ($destination) { }
60 0 0 if (ref $destination) { }
65 0 0 if ($destination =~ /$MODULE_EXTS/) { }
0 0 elsif ($destination =~ /$SCRIPT_EXTS/) { }
74 0 0 defined wantarray ? :
102 0 3 if $options{'extra_css'}
106 0 3 if ($options{'messages'}) { }
109 0 0 if (my $ref = ref $options{'messages'}) { }
111 0 0 unless $ref eq 'HASH'
117 0 0 if (-f $options{'messages'} and -r _ and open MESSAGES, "< $options{'messages'}") { }
120 0 0 if /^\s*#/ or /^\s*$/
144 0 3 unless $self->{'form_spec'}{'groups'}
0 3 if (my(%groups) = %{{} unless $self->{'form_spec'}{'groups'};})
145 0 0 unless $self->{'form_spec'}{'sections'}
149 0 0 if (exists $groups{$_->[1]{'group'}})
167 0 3 unless $self->{'form_spec'}{'sections'}
169 0 3 if ($line->[0] eq 'group') { }
3 0 elsif ($line->[0] eq 'field') { }
178 0 3 unless $self->{'form_spec'}{'patterns'}
179 0 3 unless $self->{'form_spec'}{'subs'}
182 0 3 if ($_->{'validate'})
183 0 0 if (exists $patterns{$_->{'validate'}}) { }
0 0 elsif (exists $subs{$_->{'validate'}}) { }
198 0 3 unless $self->{'form_spec'}{'lists'}
202 3 0 unless $_->{'list'}
207 0 0 if (exists $lists{$_->{'list'}}) { }
221 0 3 if $_->{'type'}
222 0 0 unless ($_->{'options'})
229 0 3 if ref $_->{'options'} and @{$_->{'options'};} >= 3
246 3 0 if ($line->[0] eq 'field')
275 0 3 $form_only ? :
290 0 0 unless $self->{'built'}
292 0 0 if ($outfile) { }
309 0 0 unless $self->{'built'}
313 0 0 if $@
320 0 0 if $self->{'build_options'}{'extra_css'}
343 0 0 $self->{'build_options'}{'form_only'} ? :
365 0 0 keys %options > 0 ? :
385 0 0 unless $package
419 0 0 unless $script_name
448 0 0 if ($use_tidy) { }
451 0 0 if ($@) { }
454 0 0 if $@
456 0 0 unless open OUT, "> $outfile"
462 0 0 unless open OUT, "> $outfile"
474 2 1 unless $self->{'built'}
595 0 0 if ($@) { }