Branch Coverage

blib/lib/Data/FormValidator.pm
Criterion Covered Total %
branch 47 52 90.3


line true false branch
139 4 39 if ($defaults)
140 1 3 unless ref $defaults eq 'HASH'
146 39 3 if (ref $profiles_or_file) { }
321 99 60 unless (ref $self)
328 106 53 if (ref $name) { }
333 0 51 unless $profile
335 0 157 unless ref $profile eq 'HASH'
338 21 136 if ($self->{'defaults'})
348 2 142 if $self->{'defaults'}{'msgs'}
976 50 3 unless $file
978 1 2 unless -f $file
979 0 2 unless -r _
982 0 2 if $self->{'profiles'} and $self->{'profiles_mtime'} <= $mtime
986 1 1 unless ref $self->{'profiles'} eq 'HASH'
997 0 157 unless ref $profile eq 'HASH'
1036 3 856 unless grep(($key eq $_), @valid_profile_keys)
1040 2 155 if (@invalid)
1057 1 82 if (ref $val eq 'HASH' and not grep((ref $val->{'constraint_method'} eq $_), 'CODE', 'Regexp')) { }
2 80 elsif (not grep((ref $val eq $_), 'HASH', 'CODE', 'Regexp')) { }
1082 81 71 if $profile->{'constraints'}
1084 53 99 if $profile->{'constraint_regexp_map'}
1088 2 74 unless grep(($key eq $_), @valid_constraint_hash_keys)
1092 2 150 if (@invalid)
1109 15 135 if (ref $profile->{'msgs'} eq 'HASH')
1111 1 16 unless grep(($key eq $_), @valid_msgs_hash_keys)
1114 1 149 if (@invalid)