X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole%2FApplication.pm;h=d9d4c2f1dc9d3f84efadaf55c96189fd454b55fa;hb=db31d100fb6cd8d260452ce3156fa8411b9936c5;hp=1fc518a35be68c939b886697400e0124939c9f77;hpb=6e56c6e09ab419776522759fc65fb0e85af66538;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role/Application.pm b/lib/Moose/Meta/Role/Application.pm index 1fc518a..d9d4c2f 100644 --- a/lib/Moose/Meta/Role/Application.pm +++ b/lib/Moose/Meta/Role/Application.pm @@ -4,42 +4,22 @@ use strict; use warnings; use metaclass; -our $VERSION = '0.89_02'; -$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{'-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); } @@ -94,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. @@ -153,22 +131,7 @@ consideration, and is intentionally not yet documented. =head1 BUGS -All complex software has bugs lurking in it, and this module is no -exception. If you find a bug please either email me, or add the bug -to cpan-RT. - -=head1 AUTHOR - -Stevan Little Estevan@iinteractive.comE - -=head1 COPYRIGHT AND LICENSE - -Copyright 2006-2009 by Infinity Interactive, Inc. - -L - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +See L for details on reporting bugs. =cut