Subject: | missing_optional_valid profile flag does nothing. |
The missing_optional_valid does not place missing optional fields in the valid hash. This appears to be because the %data hash is iterated, and naturally the missing optionals are not there.
I enclose a patch that produces the output that I expect by iterating the %optional hash, checking only for the flag and the lack of a %data entry.
Wonderful module by the way - I'd be lost or late without it.
Regards
Paul Miller
*** Results.pm Tue Jan 18 10:47:27 2005
--- Results.pm.1 Tue Jan 18 10:49:19 2005
***************
*** 387,394 ****
}
# add back in missing optional fields from the data hash if we need to
! foreach my $field ( keys %data ) {
! if ($profile->{missing_optional_valid} and $optional{$field} and (not exists $valid{$field})) {
$valid{$field} = undef;
}
}
--- 387,394 ----
}
# add back in missing optional fields from the data hash if we need to
! foreach my $field ( keys %optional ) {
! if ($profile->{missing_optional_valid} and (not exists $data{$field})) {
$valid{$field} = undef;
}
}