[Catalyst] Listing all actions in app
Paolo Gianrossi
paolino.gianrossi at gmail.com
Thu Feb 16 20:04:59 GMT 2012
2012/2/16 David Schmidt <davewood at gmx.at>
> If you start your app in debug mode you get a list of all actions.
>
>
I'd rather have the list generated automatically, not to forget any action
;)
> or ...
>
> 12 my @controllers =3D map { $app->controller($_) } $app->controllers;
> 13 for my $controller (@controllers) {
> 14 my @actions =3D $controller->get_action_methods;
> 15 say $_->name . ': ' . join(',', @{$_->attributes}) for @actions;
> 16 }
>
>
This is perfect!
Thanks so much!
cheers
paolino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120216/55395=
d81/attachment.htm
More information about the Catalyst
mailing list