Re: [Catalyst] simple question ... I think ...

2006-08-13 Thread Matt S Trout
Joe Landman wrote: > Matt S Trout wrote: > > >> Yes, but you still don't need to use a regex action. >> >> sub base :Path { >> my ($self, $c, @parts) = @_; >> my $rest = join('/', @parts); >> ... >> } >> >> If you're using a Regex action, always first ask yourself "is there an >> easier way t

Re: [Catalyst] simple question ... I think ...

2006-08-13 Thread Joe Landman
Matt S Trout wrote: > Yes, but you still don't need to use a regex action. > > sub base :Path { > my ($self, $c, @parts) = @_; > my $rest = join('/', @parts); > ... > } > > If you're using a Regex action, always first ask yourself "is there an > easier way to do this?". The answer is almost

Re: [Catalyst] simple question ... I think ...

2006-08-13 Thread Matt S Trout
Joe Landman wrote: > Solution... see below ... > > The hint I needed was that the regex'es are passed in via > $c->request->snippets. This controller definition works nicely. > > sub base : Regex('^directory(.*)$') { > my ( $self, $c ) = @_; > my ($rest); > > $rest = @{$c->reque

Re: [Catalyst] simple question ... I think ...

2006-08-13 Thread Joe Landman
Solution... see below ... Matt S Trout wrote: > 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://local

Re: [Catalyst] simple question ... I think ...

2006-08-13 Thread Matt S Trout
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,

[Catalyst] simple question ... I think ...

2006-08-13 Thread Joe Landman
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 anythi