When using BindLex with FormBuilder (perhaps with other controllers
and/or plugins), the inheritance call has to be for BindLex last:
use parent qw(Catalyst::Controller::FormBuilder
Catalyst::Controller::BindLex);
or
use base qw(Catalyst::Controller::FormBuilder
Catalyst::Controller::BindLex);
If the order is changed, it produces the following error:
Caught exception in ImagineThisIsARealApp::Controller::Unit->edit "Can't
locate object method "formbuilder" via package
"ImagineThisIsARealApp::Controller::Unit" at
/home/sawyer/code/catalyst/ImagineThisIsARealApp/script/../lib/ImagineThisIsARealApp/Controller/Unit.pm
line 59."
Line 59 can be anything that uses $self->formbuilder.
I'm not sure if this is a bug in BindLex but the good people at
#catalyst advised on reporting a bug for BindLex. I have not tested this
with other plugins or controllers, and I have also not tested it with 3
or more plugins/controllers.
Using Catalyst 5.7012, Catalyst::Controller::BindLex 0.03 and
Catalyst::Controller::FormBuilder 0.04.