use Mouse::Exporter; # enables strict and warnings
-our $VERSION = '0.46';
+our $VERSION = '0.50';
use Carp qw(confess);
use Scalar::Util qw(blessed);
sub before {
my $meta = Mouse::Meta::Class->initialize(scalar caller);
-
my $code = pop;
-
- for (@_) {
- $meta->add_before_method_modifier($_ => $code);
+ for my $name($meta->_collect_methods(@_)) {
+ $meta->add_before_method_modifier($name => $code);
}
return;
}
sub after {
my $meta = Mouse::Meta::Class->initialize(scalar caller);
-
my $code = pop;
-
- for (@_) {
- $meta->add_after_method_modifier($_ => $code);
+ for my $name($meta->_collect_methods(@_)) {
+ $meta->add_after_method_modifier($name => $code);
}
return;
}
sub around {
my $meta = Mouse::Meta::Class->initialize(scalar caller);
-
my $code = pop;
-
- for (@_) {
- $meta->add_around_method_modifier($_ => $code);
+ for my $name($meta->_collect_methods(@_)) {
+ $meta->add_around_method_modifier($name => $code);
}
return;
}
=head1 VERSION
-This document describes Mouse version 0.46
+This document describes Mouse version 0.50
=head1 SYNOPSIS
Sets this class' superclasses.
-=head2 C<< before (method|methods) => CodeRef >>
+=head2 C<< before (method|methods|regexp) => CodeRef >>
Installs a "before" method modifier. See L<Moose/before>.
-=head2 C<< after (method|methods) => CodeRef >>
+=head2 C<< after (method|methods|regexp) => CodeRef >>
Installs an "after" method modifier. See L<Moose/after>.
-=head2 C<< around (method|methods) => CodeRef >>
+=head2 C<< around (method|methods|regexp) => CodeRef >>
Installs an "around" method modifier. See L<Moose/around>.