[Catalyst] Re: Subsessions?
Larry Leszczynski
larryl at emailplus.org
Thu Oct 4 15:55:06 GMT 2007
>> On Wed, Oct 03, 2007 at 11:10:50AM +0200, Rainer Clasen wrote:
>>> Nearly all URIs in this project look like /<athlete>/diary/list or
>>> /<athlete>/exercise/add. This means all actions have to be setup
>>> for chaining manually
On Thu, 4 Oct 2007, Rainer Clasen wrote:
> With Chaining you have to specify where you actually chain to (even
> if it's "."). With ":Local" you automgagically end up in the current
> namespace, no need to bother making "." available.
Is this something that the PathPrefix[1] attribute would help with, to
make the action relative to the current namespace? E.g. create a base
class for your athlete class, something like:
package MyApp::Base::Controller::Athlete;
use base 'Catalyst::Controller';
sub diary : Chained('/') PathPrefix Args(1)
{
my ($self, $c, $action) = @_;
my $athlete = $self->path_prefix;
}
?
Larry
[1] http://use.perl.org/~LTjake/journal/31738
More information about the Catalyst
mailing list