[Catalyst] Plugin methods and context namespace
Matt S Trout
dbix-class at trout.me.uk
Fri Nov 25 03:39:13 CET 2005
On Thu, Nov 24, 2005 at 05:22:29PM -0800, John Wang wrote:
> What if the plugin methods need the $c context object like a
> Catalyst::Plugin? Will that automagically call a "new" subroutine? If so,
> can a parameter list be passed in, say:
If you need $c then this sounds more like a general controller method to
me. What about doing
package MyApp::C::Foo;
use base qw/Catalyst::Controller::Foo/;
and then calling methods with $c via
$c->forward('/foo/methodname');
or if you don't want to mark exposed stuff :Private -
$c->forward('Foo', 'methodname');
--
Matt S Trout Specialists in Perl consulting, web development, and
Technical Director UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list