-
package Moose::Meta::Role;
use strict;
use warnings;
use metaclass;
+use Class::Load qw(load_class);
use Scalar::Util 'blessed';
use Carp 'confess';
use Devel::GlobalDestruction 'in_global_destruction';
# NOTE:
# since roles are lazy, we hold all the attributes
-# of the individual role in 'statis' until which
+# of the individual role in 'stasis' until which
# time when it is applied to a class. This means
# keeping a lot of things in hash maps, so we are
# using a little of that meta-programmin' magic
$application_class = $self->application_to_instance_class;
}
- Class::MOP::load_class($application_class);
-
- my $deprecation_check = 0;
-
- if ( exists $args{excludes} && !exists $args{'-excludes'} ) {
- $args{'-excludes'} = delete $args{excludes};
- $deprecation_check = 1;
- }
- if ( exists $args{alias} && !exists $args{'-alias'} ) {
- $args{'-alias'} = delete $args{alias};
- $deprecation_check = 1;
- }
-
- if ( $deprecation_check ) {
- Moose::Deprecated::deprecated(
- feature => 'alias or excludes',
- message =>
- 'The alias and excludes options for role application'.
- ' have been renamed -alias and -excludes'.
- " (${\$other->name} is consuming ${\$self->name}".
- " - do you need to upgrade ${\$other->name}?).".
- ' This will be an error in Moose 2.0200.'
- );
- }
+ load_class($application_class);
if ( exists $args{'-excludes'} ) {
# I wish we had coercion here :)