Re:A polyglot's guide to multiple dispatch – part 3
by kbenson on Tuesday April 26, 2016 @01:58PM
(#11574124)
Since ~2009 Perl 5 has had the Moo* ecosystem of modules (Moose, Moo, Mouse) to provide an object system that supports much of this. It was created as a backport of ideas for Perl 6's object system, which was heavily inspired by CLOS and the Smalltalk traits paper (always liberally steal the best ideas!).
That is, there's quite a lot of Perl 5 out there that makes extensive use of method modifiers[1] like before, after, around and friends.
1: http://search.cpan.org/dist/Moose/lib/Moose/Manual/MethodMod...
"these features are too advanced to be useful in 99% of the cases"
I'm pretty sure when I wrote CLOS for a living (mind you, not recently) that I used :before, :around and :after rather more than that - they are a very natural and pretty simple extension to the basic method dispatch mechanism.