use Scalar::Util 'blessed';
use Class::MOP 0.60;
-our $VERSION = '0.89';
+our $VERSION = '0.89_01';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
sub add_method_modifier {
my ( $class_or_obj, $modifier_name, $args ) = @_;
- my $meta = find_meta($class_or_obj);
+ my $meta
+ = $class_or_obj->can('add_before_method_modifier')
+ ? $class_or_obj
+ : find_meta($class_or_obj);
my $code = pop @{$args};
my $add_modifier_method = 'add_' . $modifier_name . '_method_modifier';
if ( my $method_modifier_type = ref( @{$args}[0] ) ) {
The C<$applicant> must already have a metaclass object.
The list of C<@roles> should be a list of names, each of which can be
-followed by an optional hash reference of options (C<excludes> and
-C<alias>).
+followed by an optional hash reference of options (C<-excludes> and
+C<-alias>).
=item B<ensure_all_roles($applicant, @roles)>