Branch Coverage

blib/lib/HTML/FormsDj.pm
Criterion Covered Total %
branch 26 136 19.1


line true false branch
24 0 1 if (exists $$self{'meta'}{'fields'} and exists $$self{'meta'}{'fieldsets'})
28 0 1 unless (exists $$self{'field'})
32 0 1 unless (exists $$self{'meta'})
36 1 0 unless (exists $$self{'meta'}{'fields'} or exists $$self{'meta'}{'fieldsets'})
46 0 1 if (exists $$self{'csrf'}) { }
47 0 0 if ($$self{'csrf'} and not $_csrftoken)
69 0 0 if ($$this{'csrf'})
70 0 0 unless ($this->_check_csrf(%data))
77 0 0 if (exists $$this{'dfv'}) { }
84 0 0 if ($$this{'field'}{$field}{'required'}) { }
95 0 0 if (exists $$this{'attributes'})
99 0 0 unless (exists $attrs{'required'})
102 0 0 unless (exists $attrs{'optional'})
105 0 0 unless (exists $attrs{'constraint_methods'})
112 0 0 if ($results->has_invalid or $results->has_missing) { }
115 0 0 if ($results->has_missing)
120 0 0 if ($results->has_invalid)
123 0 0 if (ref $failed eq 'HASH') { }
133 0 0 if (exists $$this{'clean'}) { }
157 0 0 if (exists $$this{'error'}) { }
168 0 0 unless (exists $data{'csrftoken'})
173 0 0 if (not exists $$this{'_csrf_cookie'}) { }
178 0 0 unless ($$this{'_csrf_cookie'})
187 0 0 if ($posttoken ne $cookietoken)
201 0 1 if ($$this{'csrf'})
205 1 0 if (exists $$this{'meta'}{'fields'}) { }
235 0 0 if ($$this{'csrf'})
239 0 0 if (exists $$this{'meta'}{'fields'}) { }
268 0 0 if (exists $$this{'meta'}{'fields'}) { }
278 0 0 if (exists $$this{'meta'}{'fieldsets'}) { }
295 0 0 if ($$this{'csrf'}) { }
305 0 0 if ($$this{'csrf'}) { }
315 0 0 if ($$this{'csrf'})
359 0 0 if ($legend)
369 0 4 unless (exists $$field{'label'})
374 0 4 if (exists $$this{'markrequired'} and $$this{'field'}{$$field{'field'}}{'required'})
375 0 0 if ($$this{'markrequired'} eq 'asterisk') { }
0 0 elsif ($$this{'markrequired'} eq 'bold') { }
386 2 2 unless (exists $$field{'classes'})
390 2 2 unless (exists $$field{'id'})
394 2 2 unless (exists $$field{'message'})
397 0 4 if (exists $$this{'invalid'}{$$field{'field'}})
398 0 0 unless (exists $$field{'message'})
404 0 4 if (exists $$this{'missing'}{$$field{'field'}})
405 0 0 unless (exists $$field{'message'})
411 4 0 if (not exists $$this{'raw'}{$$field{'field'}}) { }
418 0 4 if (not exists $$this{'field'}{$$field{'field'}}{'type'}) { }
425 2 2 unless (exists $$field{'default'})
435 2 0 if (exists $$this{'meta'}{'fields'})
438 0 4 unless (exists $$field{'field'})
448 0 2 if (exists $$this{'meta'}{'fieldsets'})
452 0 0 unless (exists $$fieldset{'id'})
453 0 0 if (not exists $$fieldset{'name'}) { }
461 0 0 unless (exists $$fieldset{'classes'})
465 0 0 unless (exists $$fieldset{'legend'})
471 0 0 unless (exists $$field{'field'})
529 2 0 if ($type eq 'text' or $type eq 'password') { }
0 0 elsif ($type eq 'choice') { }
0 0 elsif ($type eq 'option') { }
0 0 elsif ($type eq 'textarea') { }
530 2 0 unless ($value)
537 0 0 if (ref $default eq 'HASH') { }
0 0 elsif (ref $default eq 'ARRAY') { }
545 0 0 if ($value eq $$option{'value'})
556 0 0 if (ref $default eq 'HASH') { }
0 0 elsif (ref $default eq 'ARRAY') { }
559 0 0 if ($value eq $$option{'value'})
573 0 0 if ($value eq $$option{'value'})