X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole%2FApplication.pm;h=34f6f58943ccdd904eddfe4f69dc69b51b297a88;hb=4c52e860380be0f4c928cd0171c4f4127edacaaf;hp=701309409d4764d3ae1d7eb75532658a178fcbf6;hpb=a8eb9fe077a08efb845facc0ba156a79682fa546;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role/Application.pm b/lib/Moose/Meta/Role/Application.pm index 7013094..34f6f58 100644 --- a/lib/Moose/Meta/Role/Application.pm +++ b/lib/Moose/Meta/Role/Application.pm @@ -20,36 +20,8 @@ __PACKAGE__->meta->add_attribute('method_aliases' => ( default => sub { {} } )); -__PACKAGE__->meta->add_attribute('fire_alias_excludes_warning' => ( - init_arg => 'fire_alias_excludes_warning', - reader => 'fire_alias_excludes_warning', - default => 0 -)); - sub new { my ($class, %params) = @_; - - if ( exists $params{excludes} || exists $params{alias} ) { - $params{fire_alias_excludes_warning} = 1; - } - - if ( exists $params{excludes} && !exists $params{'-excludes'} ) { - $params{'-excludes'} = delete $params{excludes}; - } - if ( exists $params{alias} && !exists $params{'-alias'} ) { - $params{'-alias'} = delete $params{alias}; - } - - if ( exists $params{'-excludes'} ) { - - # I wish we had coercion here :) - $params{'-excludes'} = ( - ref $params{'-excludes'} eq 'ARRAY' - ? $params{'-excludes'} - : [ $params{'-excludes'} ] - ); - } - $class->_new(\%params); } @@ -75,14 +47,6 @@ sub is_aliased_method { sub apply { my $self = shift; - if ($self->fire_alias_excludes_warning) { - Moose::Deprecated::deprecated( - feature => 'alias or excludes', - message => - "The alias and excludes options for role application have been renamed -alias and -excludes (applying ${\$_[0]->name} to ${\$_[1]->name} - do you need to upgrade ${\$_[1]->name}?)" - ); - } - $self->check_role_exclusions(@_); $self->check_required_methods(@_); $self->check_required_attributes(@_);