[Catalyst] chained actions, knowing if current action is an endpoint or not

Brian Cassidy brian.cassidy at nald.ca
Fri Feb 2 12:10:22 GMT 2007


Matt S Trout wrote:
>
> On 1 Feb 2007, at 17:37, John Napiorkowski wrote:
>> Hmm, interesting point.  I'm going to go and try
>> writing something that trys to modify the
>> ActionContainer and see what happens! --john
>
> You'd be better screwing with $c->action, I think. Something like
>
> if ($c->stack->[-1] eq $c->action->chain->[-1]) {
>   # we're in the last action in the chain
I remember you helping me with a little blog post on a similar subject:

http://use.perl.org/~LTjake/journal/30656

if( $c->action eq $c->stack->[ -1 ] ) {
    # We've not been forwarded yet
}

-Brian



More information about the Catalyst mailing list