"Couldn't load field class" error

28 views
Skip to first unread message

Steve Schafer

unread,
Apr 17, 2012, 2:05:27 PM4/17/12
to formhandler
Hello,

Can anyone give me a clue as to how to go about fixing this type of
error?

Could not load field class 'Email' for field 'requestoremail' at /usr/
lib/perl5/site_perl/5.8.8/HTML/FormHandler/BuildFields.pm

The form (along with several others) renders with errors *some* of the
time, but not *all* the time. I am trying to update several modules
(Catalyst to 5.90011, Moose to 2.0403, and HFH to .40006) I have read
the notes about rendering, but am not sure this is causing the
problem.

Incidentally, when my forms render, they seem to look fine and work
properly.

Any help is much appreciated!

Steve

Gerda Shank

unread,
Apr 17, 2012, 2:24:54 PM4/17/12
to formh...@googlegroups.com
On 4/17/12 2:05 PM, Steve Schafer wrote:
> Hello,
>
> Can anyone give me a clue as to how to go about fixing this type of
> error?
>
> Could not load field class 'Email' for field 'requestoremail' at /usr/
> lib/perl5/site_perl/5.8.8/HTML/FormHandler/BuildFields.pm
My guess would be that Email::Valid is a problem. The attempt to load a
field will fail if it doesn't compile. For the 'email' field that would
mainly be because of Email::Valid.

There's a head-scratching CPAN testers report out there that shows a
bunch of test failures because it can't load Email::Valid, when it's
clearly listed as a prereq. Maybe there was some version of Email::Valid
that was problematic?

It does seem odd that it would fail randomly though. Do you have
different sets of Perl libraries?

Gerda

Steve

unread,
Apr 17, 2012, 2:44:24 PM4/17/12
to formh...@googlegroups.com

On 4/17/2012 2:24 PM, Gerda Shank wrote:
> On 4/17/12 2:05 PM, Steve Schafer wrote:
>> Hello,
>>
>> Can anyone give me a clue as to how to go about fixing this type of
>> error?
>>
>> Could not load field class 'Email' for field 'requestoremail' at /usr/
>> lib/perl5/site_perl/5.8.8/HTML/FormHandler/BuildFields.pm
> My guess would be that Email::Valid is a problem. The attempt to load
> a field will fail if it doesn't compile. For the 'email' field that
> would mainly be because of Email::Valid.
Could be, but this happens with other field types as well (ie. Hidden,
Date, Select, Repeatable). Approximately 50% of the time the form renders.

>
> There's a head-scratching CPAN testers report out there that shows a
> bunch of test failures because it can't load Email::Valid, when it's
> clearly listed as a prereq. Maybe there was some version of
> Email::Valid that was problematic?
I don't think so.

>
> It does seem odd that it would fail randomly though. Do you have
> different sets of Perl libraries?
No.

Gerda Shank

unread,
Apr 17, 2012, 5:44:02 PM4/17/12
to formh...@googlegroups.com
If it fails for multiple fields, then you probably have some modules in
an inconsistent state or at a bad level. It's unlikely to be a
FormHandler problem.

You could try running moose-outdated. I'd also try updating things like
Module::Runtime, Class::Load, and B::Hooks::EndOfScope.

You might also try getting more information. Running the FormHandler
test suite might be useful. If you can get in a situation where it
regularly fails, loading the fields yourself might make the real error
more accessible.

Gerda

Reply all
Reply to author
Forward
0 new messages