[html-formfu] Odd "bool" overload error on submitted page once reloaded

Carl Franks fireartist at gmail.com
Thu Aug 16 16:28:51 GMT 2007


On 16/08/07, Brian Cassidy <brian.cassidy at nald.ca> wrote:
> Hey all,
>
> I'm just doing some manual form testing by submitting a form and then
> reloading the page (thus re-POST-ing the params) as i make changes.
> However, often times, on first reload i get this:
>
> Operation "bool": no method found, argument in overloaded package
> HTML::FormFu::Element::text at
> /usr/local/share/perl/5.8.8/HTML/FormFu.pm line 189
>
> I can reload the page once more and the error goes away.
>
> I don't have a lot of time to dedicate to debugging this error, but it
> seems like a text field is being asked if it's true or not (line 189):
>
> next unless $self->get_field($param);
>
> but the overload pragma isn't working quite right.
>
> I've noticed that Element.pm's overload usage doesn't have "fallback =>
> 1" -- perhaps it's needed?

Ok, I've now added 'fallback' to all overloads.

I've also changed that particular line in HTML/FormFu.pm to a
defined() check, rather than truth.

Thanks,
Carl



More information about the HTML-FormFu mailing list