[html-formfu] inheritance question

Carl Franks fireartist at gmail.com
Mon Feb 23 09:33:24 GMT 2009


2009/2/22 Malcolm <mjh-formfu at liminalflux.net>:
> On Sunday 22 February 2009, Malcolm wrote:
>> There's probably something obvious I'm completely missing, but can someone
>> explain (or point me at the right place to RTFM, as I can't find it) why
>> this works:
>>
>>       package MySite::Controller::Profile;
>>       use parent qw(MySite::Controller::Base Catalyst::Controller::HTML::FormFu
>> );
>>
>> but this:
>>
>>       package MySite::Controller::Profile;
>>       use parent qw(Catalyst::Controller::HTML::FormFu
>> MySite::Controller::Base);
>>
>> fails to process forms at all ($c->stash->{form} is empty).
>
> Though it would probably help if I got my examples the correct way around.
>
>        package MySite::Controller::Profile;
>        use parent qw(Catalyst::Controller::HTML::FormFu MySite::Controller::Base);
> works.
>
>        package MySite::Controller::Profile;
>        use parent qw(MySite::Controller::Base Catalyst::Controller::HTML::FormFu);
> does not.

Without the code for MySite::Controller::Base, I can only guess that
it's inheriting
from Catalyst::Controller which has a create_action sub, meaning that
C::C::HTML::FormFu's
won't be called.

Carl



More information about the HTML-FormFu mailing list