[Catalyst] url parsing and sub controller

Allen S. Rout asr at ufl.edu
Mon Sep 5 23:54:04 CEST 2005


==> On Mon, 05 Sep 2005 19:00:19 +0200, Danijel Milicevic <Danijel.Milicevic at rawmode.org> said:


> You might wanna check the docs for the "begin" action and its function.
> Don't use it for this kinda thing, you a dedicated *public* action to handle
> arguments.

Would it be appropriate to do this in an auto() ? 

I'm thinking it'd be nice to shove as much of this kind of housekeeping work up
to the application as possible. 

Alternately one could

package MyApp;

sub Process_Args: Global { ... }



and then explicitly 

package MyApp::C::Page

sub default: private 
 {
    my ( $self, $c ) = @_;
    $c->Process_Args($c);
    [...]
 }


or some similar pattern.

I'm currently working with the latter.  My itch of the instant is that I wish
I could tell Process_Args that it gets run All The Time at the MyApp level.

Of course, it's entirely possible that there's a defined and documented method
to do this, so a whack with a cluestick won't offend.


- Allen S. Rout



More information about the Catalyst mailing list