my %args = @_;
my $class = $args{for_class}
- or confess("Cannot call init_meta without specifying a for_class");
+ or confess("Cannot call init_meta without specifying a for_class");
my $base_class = $args{base_class} || 'Mouse::Object';
my $metaclass = $args{metaclass} || 'Mouse::Meta::Class';
package Mouse::Meta::Role;
-use Mouse::Util qw(:meta not_supported); # enables strict and warnings
+use Mouse::Util qw(:meta); # enables strict and warnings
use Mouse::Meta::Module;
our @ISA = qw(Mouse::Meta::Module);
$args{_to} = 'instance';
$instance = $consumer;
- $consumer = (Mouse::Util::class_of($instance) || 'Mouse::Meta::Class')->create_anon_class(
- superclasses => [ref $instance],
- cache => 1,
- );
+ $consumer = (Mouse::Util::class_of($instance) || 'Mouse::Meta::Class')
+ ->create_anon_class(
+ superclasses => [ref $instance],
+ cache => 1,
+ );
}
if($args{alias} && !exists $args{-alias}){
Carp::croak "Roles do not support 'extends'";
}
-sub with {
- my $meta = Mouse::Meta::Role->initialize(scalar caller);
- Mouse::Util::apply_all_roles($meta->name, @_);
+sub with {
+ Mouse::Util::apply_all_roles(scalar(caller), @_);
return;
}