[Catalyst] another newbie chaining question

John Napiorkowski jjn1056 at yahoo.com
Wed Sep 6 22:55:28 CEST 2006


Hi,

Anyway to get the action which was previous to the
current one in a given chain?  I know you can get the
previous arguments and captures but right now I'm
using a stash setting as a hackaround:

sub first :Chained CaptureArgs(1)
{
  my ($self, $c, $arg) = @_;
  $c->stash->{'last_action'} = $c->action;
}

sub second :Chained CaptureArgs(0)
{
  my ($self, $c, $arg) = @_;
 
  $c->log->debug("The previous action was:
".$c->stash->{'last_action'});
}

I from looking at all the action code my head is
spinning a bit.  Anyone run into this kind of problem?

Thanks, sorry for posting so many questions lately, I
know you're all busy like me.

--john

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Catalyst mailing list