[Catalyst] simple question ... I think ...
Matt S Trout
dbix-class at trout.me.uk
Sun Aug 13 18:49:38 CEST 2006
Joe Landman wrote:
> Ok, being stupid today
>
> I have a simple controller named directory. It has a default method.
> So things named
>
> http://localhost:3000/directory
>
> should go to it. Now I want to capture
>
> http://localhost:3000/directory/other/things/...
>
> that is, I want this controller to handle anything past the default
> method. It does this by default. My question is, how do I get access
> to the rest of the path after /directory? This is what I have ...
>
> sub default : Regex('^(.*)$') {
> my ( $self, $c, $rest ) = @_;
> ...
>
> }
sub base :Path {
...
}
> and I want $rest to be /other/things/...
>
> This is not working though. I tried a Path('/directory') that worked,
> as long as I gave it /directory/other. As soon as I tried
> /directory/other/things, it gave me /directory/other.
sub other :Local :Args(0) { ... }
so /directory/other only is matched by that method
> Hmmm...
>
> Hints? Clues? FAQs? Pointers?
Catalyst::Manual::Intro has been improved for 5.70 and explains the attrs
better now.
More information about the Catalyst
mailing list