Method::Modifiers provides some wrappers to the wrap() method in Perl 6.
Perl 6
Switch branches/tags
Nothing to show
Latest commit 4a4180e Nov 3, 2016 @supernovus committed on GitHub Merge pull request #5 from atweiden/kebab-case
fix kebab case
Failed to load latest commit information.
lib/Method fix kebab case Jan 7, 2016
t fix kebab case Jan 7, 2016 Add mandatory "perl" META field Oct 26, 2016 First version Nov 6, 2012



Implements before(), after() and around() functions that can be used to modify class methods similarly to Perl 5's Moose. It uses wrap() internally, and returns the wrapper handler, so it is easy to .restore() the original.

Has an optional augmentation version that adds the aforementioned functions as methods to the Any class. Mostly just a candy coating, and not really recommended. Use the functions, they're straightforward and don't modify the base classes.


See the tests in "t/" for a few good examples.


The basic function version works. The augment version doesn't due to a Rakudo bug. That's okay, as I mentioned above, the augment version isn't really recommended anyway.


Timothy Totten


Artistic License 2.0