[Catalyst] Reusable actions, AOP vs. other styles
Andreas Marienborg
omega at palle.net
Fri Apr 7 10:47:29 CEST 2006
On 7. apr. 2006, at 10.31, Sebastian Riedel wrote:
>
> 07.04.2006 09:31 Dominique Quatravaux:
>> Would you please offer some enlightenment as to why you prefer AOP?
>
> Base classes affect the whole controller, reusable components just
> the action.
>
> package MyApp::Controller::Foo;
> use base 'Catalyst::Controller';
>
> sub add : Local : Action('Add') {}
>
> sub del : Local : Action('Del') {}
And if I understand correctly, there will be several "hooks" for the
Actions? like before the controller-part, after controller-part etc,
which IMO is harder to achive in an OOP world. (the simple wrapping
of functions).
andreas
More information about the Catalyst
mailing list