Branch Coverage

blib/lib/Text/FormBuilder.pm
Criterion Covered Total %
branch 22 110 20.0


line true false branch
64 0 0 unless $options
65 0 0 if ($destination) { }
66 0 0 if (ref $destination) { }
71 0 0 if ($destination =~ /$MODULE_EXTS/) { }
0 0 elsif ($destination =~ /$SCRIPT_EXTS/) { }
80 0 0 defined wantarray ? :
111 0 5 if ($options{'external_css'})
113 0 0 if ($ref eq 'ARRAY') { }
0 0 elsif ($ref) { }
123 0 5 if $options{'extra_css'}
127 0 5 if ($options{'messages'}) { }
130 0 0 if (my $ref = ref $options{'messages'}) { }
132 0 0 unless $ref eq 'HASH'
138 0 0 if (-f $options{'messages'} and -r _ and open MESSAGES, "< $options{'messages'}") { }
141 0 0 if /^\s*#/ or /^\s*$/
165 0 5 unless $$self{'form_spec'}{'groups'}
0 5 if (my(%groups) = %{{} unless $$self{'form_spec'}{'groups'};})
166 0 0 unless $$self{'form_spec'}{'sections'}
170 0 0 if (exists $groups{$$_[1]{'group'}})
195 0 5 unless $$self{'form_spec'}{'sections'}
197 0 10 if ($$line[0] eq 'group') { }
10 0 elsif ($$line[0] eq 'field') { }
207 0 5 unless $$self{'form_spec'}{'patterns'}
208 0 5 unless $$self{'form_spec'}{'subs'}
211 0 10 if ($$_{'validate'})
212 0 0 if (exists $patterns{$$_{'validate'}}) { }
0 0 elsif (exists $subs{$$_{'validate'}}) { }
227 0 5 unless $$self{'form_spec'}{'lists'}
231 10 0 unless $$_{'list'}
236 0 0 if (exists $lists{$$_{'list'}}) { }
250 0 10 if $$_{'type'}
251 0 0 unless ($$_{'options'})
258 0 10 if (ref $$_{'options'} and @{$$_{'options'};} >= 3)
270 0 10 unless ($FB_version >= 3.02)
272 0 0 if ($$field{$_})
283 10 0 if ($$line[0] eq 'field')
290 0 5 if ($$self{'form_spec'}{'fb_params'})
293 0 0 if ($@)
303 0 5 defined $$self{'form_spec'}{'submit'} ? :
0 5 $form_only ? :
346 0 0 unless $$self{'built'}
348 0 0 if ($outfile) { }
361 0 0 keys %{$$self{'form_options'};} > 0 ? :
380 0 0 unless $package
386 0 0 unless $$self{'built'}
444 0 0 if $use_tidy
455 0 0 unless $outfile =~ /\.pm$/
464 0 0 unless $$self{'built'}
488 0 0 if $use_tidy
496 0 0 unless $script_name
507 0 0 if $@
510 0 0 $use_tidy =~ /^-/ ? :
521 0 0 unless open OUT, "> $outfile"
532 4 1 unless $$self{'built'}
660 0 0 if (not $@) { }