++ed by:
RSIMOES ARISTOTLE AYOUNG

3 PAUSE users
1 non-PAUSE user.

藤 吾郎
and 1 contributors

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.

INTERFACE

Default exported functions

before(method(s) => code)
around(method(s) => code)
after(method(s) => code)

Exportable functions

add_method_modifier(class, modifer_type, method(s), modifier)

SEE ALSO

Data::Util.

Moose.

Class::Method::Modifiers.