[Catalyst] Relative links

Bill Moseley moseley at hank.org
Thu Nov 10 01:49:16 CET 2005


On Thu, Nov 10, 2005 at 12:33:33AM +0000, Matt S Trout wrote:
> Bear in mind also that there's now a $c->namespace that keeps the *current
> namespace* being executed in - so it changes on forward etc. $c->action
> doesn't because it's the main action of the request rather than the current
> namespace.

Not something I already knew.

So, it's not useful in a template:

    <li>Local namespace = '[% c.namespace %]'<li>
    Local namespace = 'WS2::V::TT'

But I could use it in actions that might get forwarded *to*:

    $c->stash->{cur_namespace} = $c->namespace;

Cool.

-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list