[Catalyst] Knowing which actions are avaiable for forward

Diego de Lima diego at sistemica.info
Wed May 25 00:56:19 CEST 2005

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?


Diego de Lima

>Am 23.05.2005 um 15:26 schrieb Diego de Lima:
>> 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.
>    use Catalyst::Utils;
>    use Data::Dumper;
>     warn Dumper Catalyst::Utils::reflect_actions('MyApp::C::Foo');
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20050524/8a8e4627/attachment.htm

More information about the Catalyst mailing list