[Catalyst] Knowing which actions are avaiable for forward

Chisel Wright chisel at herlpacker.co.uk
Mon May 23 18:17:25 CEST 2005


On Mon, May 23, 2005 at 10:26:46AM -0300, Diego de Lima wrote:
>    Hi,
>    
>    Is there a way which I can list all avaiable actions I can forward, on a
>    View or Controller?
>    
>    I don't want to know _if_ I can forward, I want to get an array with all
>    actions I can forward to.

Well, when I start with -Debug I do see a list of (available) private
actions, so it's possible.

It looks like the magic to print this out is in Catalyst::Dispatcher, in
setup_actions().

I don't have the time to digest the code, but if it's not accessible
through $c, you might be able to steal some ideas from there.

Catalyst::Dispatcher does seem to store $self->actions, but I don't know
if/how you might reach this from your app.

Chisel
-- 
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/



More information about the Catalyst mailing list