[Catalyst] How to execute controller at startup

Aditya Verma verma.aditya1 at gmail.com
Tue Aug 7 07:33:04 GMT 2007


Hi All,

Thank you very much for all your valuable comments at appreciate your quick
response.

I have one more query.
I have implemented a Plugin. How can I call a plugin method from controller
outside of the controller methods.

suppose i have a Plugin named "Catalyst::Plugin::MyPlugin" contains a method
called "sub myFunc {}"

Now i want to call myFunc from controller but i dont have context object
outside of methods so currently I am doing:
Catalyst::Plugin::MyPlugin::myFunc();

which is a normal function call (not catalyst way of doing, not even object
oriented).
Could you please suggest me an efficient way to call that method.

Thanks,
Aditya


On 8/6/07, John Napiorkowski <jjn1056 at yahoo.com> wrote:
>
>
> --- Aditya Verma <verma.aditya1 at gmail.com> wrote:
>
> > Hi,
> >
> > I am new to catalyst.
> > I have developed an application using Catalyst.
> >
> > I need all my controllers to execute at startup and
> > register there method
> > URLs.
> > I am not getting how to execute controller at
> > startup.
> >
> > Please help me.
> >
> > Thanks,
> > Aditya
>
> Hi,
>
> Catalyst Controllers are subclasses of
> Catalyst::Component so are automatically located a
> registered by your primary Catalyst class at startup.
> If you are finding that you don't see your controllers
> and/or actions in the debug screen when you start the
> development server then you must have some typos in
> the controller package names or something similar.
>
> Please give us a little more detail about your trouble
> and the actually need that you are trying to fill.
>
> --john
>
>
>
>
>
> _________________________________________________________________________=
___________
> Be a better Heartthrob. Get better relationship answers from someone who
> knows. Yahoo! Answers - Check it out.
> http://answers.yahoo.com/dir/?link=3Dlist&sid=3D396545433
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070806/fc6ad=
21c/attachment.htm


More information about the Catalyst mailing list