Subject: | inflate broken |
Hi, I've discovered that specifying an inflate to a field is broken when
the inflate sub returns an object (the normal case, I would assume). The
faulty logic is in htmlattr (Util.pm:241):
# Anything but normal scalar data gets yanked
next if ref $val || ! defined $val;
This means that if $val is a reference (as indeed it is for an inflated
value), it gets skipped. One solution would be to change that to read
# Anything but normal scalar data, or an inflated object gets yanked
next if $key ne 'value' && ref $val || ! defined $val;
but this is a little messy. Perhaps Field/text.pm:130ish should be
changed from:
$attr->{value} = $value; # override
delete $attr->{value} unless defined $value;
to:
$attr->{value} = "$value" unless defined $value;
But then i assume other Fields would also have to be changed?