[Catalyst] When using multiple controllers as base

Tomohiro Teranishi tomohiro.teranishi at gmail.com
Fri Mar 30 13:40:29 GMT 2007


Hi,

I was looking at source code for C::C::FormBuilder to know how to
write Controller extention module. Then I thought using new() method
is nice idea to run only once.

But I realize when I want to use two controller extention modules same
time, it may cause problem because of NEXT specification.

e.x.

Let's say , I want to use C::C::FormBuilder and C::C::BindLex same time.

# Below case is OK
use base qw/Catalyst::Controller::FormBuilder Catalyst::Controller::BindLex/;

# In this case,  C::C::FormBuilder->new will not called.
use base qw/Catalyst::Controller::BindLex Catalyst::Controller::FormBuilder/;

I think only first base module run NEXT but not the others.

Am I doing something wrong??
or should not use new() ??
or should not use multiple controllers??

thanks,

Tomohiro Teranishi



More information about the Catalyst mailing list