Subject: | Upload types can't be in dependencies |
I have this in my form code:
has '+dependency' => (
default => sub {
[ [qw/image title credit credit_url/] ];
}
);
However, the 'image' was of type 'Upload'. In HTML::FormHandler::_set_dependency where
the values are checked, we have the following:
if ( ref $value ) {
# at least one value is non-blank
next unless grep { /\S/ } @$value;
}
else {
next unless $value =~ /\S/;
}
If the $value is a reference, it's assumed to be an array ref. However, for an upload, it's a
Catalyst::Request::Upload, a blessed hash, and my code falls down and goes boom :)
Cheers,
Ovid