Re: [Catalyst] proper flow control with $c-foward, in search of greater grok

2010-01-08 Thread Tomas Doran
Dennis Daupert wrote: It seems that when chained path parts increase beyond two links, addressing actions directly doesn't work quite as well. For example, I have these: User.pm User::Blog.pm User::Blog::Entry.pm After I add an entry to blog 'x' for user 'y', I can transport over to the

Re: [Catalyst] proper flow control with $c-foward, in search of greater grok

2010-01-08 Thread Bill Moseley
On Fri, Jan 8, 2010 at 6:55 AM, Tomas Doran bobtf...@bobtfish.net wrote: $c-response-redirect($c-uri_for(/user/$user_id/blog/$blog_id/entry/list)); Eww, don't do that. You want $c-response-redirect($c-uri_for_action('/user/blog/entry/list', [$user_id, $blog_id])); I agree that's the

[Catalyst] Running Catalyst App from Command Line (or via Cron)

2010-01-08 Thread Christoph Friedrich
Hello there, I need to build a script for my catalyst application that reads some data and put it into the database. This script needs to run as a daily cron job. My first idea was to create a controller which handles this for me and use some of the other engines for catalyst (like

Re: [Catalyst] Running Catalyst App from Command Line (or via Cron)

2010-01-08 Thread Stuart Watt
I always liked the solution used by Drupal of simply making cron use curl/wget/... to request a special URL. Then it becomes an action and is easy to code and configure almost on any platform. Long-running tasks (beyond that of an HTTP request) are a different matter. At present, we do this

Re: [Catalyst] Running Catalyst App from Command Line (or via Cron)

2010-01-08 Thread J. Shirley
On Fri, Jan 8, 2010 at 7:58 AM, Christoph Friedrich christ...@christophfriedrich.de wrote: Hello there, I need to build a script for my catalyst application that reads some data and put it into the database. This script needs to run as a daily cron job. My first idea was to create a

Re: [Catalyst] proper flow control with $c-foward, in search of greater grok

2010-01-08 Thread Dennis Daupert
On Fri, Jan 8, 2010 at 9:55 AM, Tomas Doran bobtf...@bobtfish.net wrote: $c-response-redirect($c-uri_for(/user/$user_id/blog/$blog_id/entry/list)); Eww, don't do that. I know, I held my nose when doing that, but in point of fact, it does work, so in a pinch You want

[Catalyst] Applying parameterized roles to Catalyst controllers

2010-01-08 Thread Oliver Charles
Hi, I've asked this question a few times, but never got far enough to actually solve the problem. So, instead of asking on IRC again and losing the logs/forgetting stuff, I'm going to try here! I have a role that needs to be parameterized before it is applied to my controller. However, Catalyst

[Catalyst] Re: Applying parameterized roles to Catalyst controllers

2010-01-08 Thread Oliver Charles
ERROR: RETARD AT COMPUTER. Turns out this is *exactly* possible at the moment: http://github.com/bobtfish/moosex-methodattributes/blob/master/t/param_role.t Sigh, I feel a little bit dumb now -- Oliver Charles / aCiD2 ___ List:

[Catalyst] create controller helper

2010-01-08 Thread Kiffin Gish
When I call 'script/myapp_create.pl controller Base' it creates the module Base.pm with the following statement: BEGIN { extends 'Catalyst::Controller'; } What's the advantage of doing this? Are there any times one would NOT want to place it within BEGIN? Also, I see that the following is not

Re: [Catalyst] create controller helper

2010-01-08 Thread Tomas Doran
On 8 Jan 2010, at 19:48, Kiffin Gish wrote: When I call 'script/myapp_create.pl controller Base' it creates the module Base.pm with the following statement: BEGIN { extends 'Catalyst::Controller'; } What's the advantage of doing this? Are there any times one would NOT want to place it within