[Catalyst] Re: Branding - or path prefix

phaylon phaylon at dunkelheit.at
Fri Aug 12 16:30:24 CEST 2005


Am Freitag, den 12.08.2005, 16:23 +0200 schrieb Uwe Voelker:
> Hello,
> 
> > sub prepare_action {
> >     my ( $c, @rest ) = @_;
> >     my $r = $c->NEXT::prepare_action( @rest );
> > 
> >     #-- this line cuts of the first arg and puts it in the stash
> >     $c->stash->{path_prefix} = shift @{ $c->request->args };  
> > 
> >     $c->log->debug( 'Prefix is ' . $c->stash->{path_prefix} );
> >     return $r;
> > }
> 
> I tried this suggestion, but it didn't work.

Jep. That was a fast shot that had an error, Bill came up with a
correction. :)

> But I came up with this:
> ...
> I use it and so far it works great :-)

Well, that's what counts ;) And looks very good imo.


p

-- 
http://www.dunkelheit.at/

Better to reign in hell than to serve in heaven
                        -- John Milton, Paradise Lost




More information about the Catalyst mailing list