[Catalyst] Knowing which actions are avaiable for forward

Sebastian Riedel sri at oook.de
Wed May 25 12:31:51 CEST 2005

Am 25.05.2005 um 00:56 schrieb Diego de Lima:

> Thanks for the tip! But I need to know also the name of the sub.
> I read the source of this sub, but "reflect_actions" uses the  
> "_action_cache" property, which is defined at a  
> MODIFY_CODE_ATTRIBUTES in Catalyst::Base (and I think perl  
> attributes knows nothing about sub names). I also tryed to access  
> the symbol table, with %{ *{"MyApp::"} }, but i got so many  
> coderefs that it seems impossible to know which ones are "real"  
> actions and which ones are exported things!
> Any other way I could try to find the sub names?

reflect_actions was just meant to be a hint in the right direction.
Take a look at the big loop in Catalyst::Dispatcher::setup_actions,  
it finds the names even for inherited actions.


More information about the Catalyst mailing list