NAME
Method::Modifiers - Lightweight method modifiers
SYNOPSIS
package Foo;
use warnings;
use Data::Util qw(:all);
use Method::Modifiers;
before old_method =>
curry \&warnings::warnif, deprecated => q{"old_method" is deprecated, use "new_method" instead};
my $success = 0;
after qw(foo bar baz) => sub{ $success++ };
around foo => sub{
my $next = shift;
my $self = shift;
$self->$next(map{ instance $_, 'Foo' } @_);
};
DESCRIPTION
This module is an implementation of Class::Method::Modifiers
that provides Moose
-like method modifiers.
This is just a front-end of Data::Util::modify_subroutine()
and Data::Util::subroutine_modifier()
See Data::Util for details.