Skip to content

supernovus/perl6-method-modifiers

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
t
 
 
 
 
 
 

Method::Modifiers

Introduction

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.

Examples

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

Status

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.

Author

Timothy Totten

License

Artistic License 2.0

About

Method::Modifiers provides some wrappers to the wrap() method in Perl 6.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages