Subject: | DFV fails to validate profiles with file uploads - Can't coerce GLOB to string |
Hi Mark,
I'm seeing some odd behavior with DFV 4.01 and CAP::ValidateRM 2.00 on one of my systems when using a form that has enctype set to multipart/form-data. Basically whenever I try to get the $r->valid, I'm getting the following error when trying to pass the hasref into CGI::Uploader:
"Use of uninitialized value in ref-to-glob cast at (eval 111) line 3."
"Use of uninitialized value in hash element at (eval 111) line 3."
If I do not set the enctype in the form, I do not see these errors but then CGI::Uploader can't handle the upload.
If I try to dump $results->valid, I get a hash, not a hashref and sometimes (can't seem to pin this down) get the following error:
"Error executing run mode 'upload_process': Can't coerce GLOB to string in entersub at /usr/lib/perl/5.8/Data/Dumper.pm line 158."
It's very unusual behavior. Sorry to be so vague but I wanted to just capture these thoughts in case someone has seen or runs into this problem.
Perl v5.8.4
Debian Linux (Testing)
Profile = {
required => [qw/rm/],
optional => [ qw/file1 file2 file3 file4 file5/ ],
}
Thanks for any suggestions,
William