Add definition context to every accessor defined internally
[gitmo/Moose.git] / lib / Moose / Meta / Role / Application.pm
index 19e44e7..d9d4c2f 100644 (file)
@@ -4,50 +4,22 @@ use strict;
 use warnings;
 use metaclass;
 
-our $VERSION   = '1.12';
-$VERSION = eval $VERSION;
-our $AUTHORITY = 'cpan:STEVAN';
-
 __PACKAGE__->meta->add_attribute('method_exclusions' => (
     init_arg => '-excludes',
     reader   => 'get_method_exclusions',
-    default  => sub { [] }
+    default  => sub { [] },
+    Class::MOP::_definition_context(),
 ));
 
 __PACKAGE__->meta->add_attribute('method_aliases' => (
     init_arg => '-alias',
     reader   => 'get_method_aliases',
-    default  => sub { {} }
+    default  => sub { {} },
+    Class::MOP::_definition_context(),
 ));
 
 sub new {
     my ($class, %params) = @_;
-
-    if ( exists $params{excludes} || exists $params{alias} ) {
-        Moose::Deprecated::deprecated(
-            feature => 'alias or excludes',
-            message =>
-                "The alias and excludes options for role application have been renamed -alias and -excludes"
-        );
-    }
-
-    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);
 }
 
@@ -102,14 +74,12 @@ sub apply_after_method_modifiers    { (shift)->apply_method_modifiers('after'  =
 
 1;
 
+# ABSTRACT: A base class for role application
+
 __END__
 
 =pod
 
-=head1 NAME
-
-Moose::Meta::Role::Application - A base class for role application
-
 =head1 DESCRIPTION
 
 This is the abstract base class for role applications.
@@ -163,18 +133,5 @@ consideration, and is intentionally not yet documented.
 
 See L<Moose/BUGS> for details on reporting bugs.
 
-=head1 AUTHOR
-
-Stevan Little E<lt>stevan@iinteractive.comE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2006-2010 by Infinity Interactive, Inc.
-
-L<http://www.iinteractive.com>
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
 =cut