Chris Prather wrote:
On Mon, Oct 12, 2009 at 12:11 PM, Yuri Shtil <yu...@juniper.net> wrote:
Hi,
Have anyone tried to use Aspect
<http://search.cpan.org/%7Eadamk/Aspect-0.21/lib/Aspect.pm> with Moose
classes?
I suspect other than the subroutine collision on before/after it
*should* work. Specifically I haven't heard of anybody who's been
using them together. Moose's built in tools tend to be enough for most
people (Roles, Delegation, Method Modifiers, Explicit MOP).
That said, I've found over the last decade that AOP doesn't really
solve more problems than it creates.You end up with a *ton* of action
at a distance and difficult to follow code. Separation of concerns is
good, and Moose provides a lot of built in tools to do it (see above)
but it's one tool in the box and not always the most useful tool if
your goal is communicating with other programmers.
-Chris
If I understand your reply correctly, it is possible to implement
all/most Aspect goodies using Moose, but it would be a hard sell to others.
--
Yuri