[Catalyst] accessing methods in another controller?
Ash Berlin
ash_cpan at firemirror.com
Sun Aug 5 16:16:08 GMT 2007
Alan Spector wrote:
> Hi all,
>
> I had a quick question, what is the best way within a Controller to
> access a method in another controller? or is it better to put the
> method (it's a fetch for data in a particular format) in my Model?
>
> tia,
>
> alan
>
$c->controller('OtherController')->foo($c)
Its that simple. There is a $c->forward method (look in Catalyst.pm for
docs) but most of the time you don't need to use it.
More information about the Catalyst
mailing list