X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole%2FApplication.pm;h=d9d4c2f1dc9d3f84efadaf55c96189fd454b55fa;hb=dc2b7cc8f128cbc6c677b209553f6fe0c45af8be;hp=1d17034a17ea46d02449b57cd44d4ce806d87371;hpb=74397c13ad55fc865db34721aed512d4f605fadf;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role/Application.pm b/lib/Moose/Meta/Role/Application.pm index 1d17034..d9d4c2f 100644 --- a/lib/Moose/Meta/Role/Application.pm +++ b/lib/Moose/Meta/Role/Application.pm @@ -4,32 +4,22 @@ use strict; use warnings; use metaclass; -our $VERSION = '0.75_01'; -$VERSION = eval $VERSION; -our $AUTHORITY = 'cpan:STEVAN'; - __PACKAGE__->meta->add_attribute('method_exclusions' => ( - init_arg => 'excludes', + init_arg => '-excludes', reader => 'get_method_exclusions', - default => sub { [] } + default => sub { [] }, + Class::MOP::_definition_context(), )); __PACKAGE__->meta->add_attribute('method_aliases' => ( - init_arg => 'alias', + init_arg => '-alias', reader => 'get_method_aliases', - default => sub { {} } + default => sub { {} }, + Class::MOP::_definition_context(), )); -sub new { +sub new { my ($class, %params) = @_; - - if (exists $params{excludes}) { - # I wish we had coercion here :) - $params{excludes} = (ref $params{excludes} eq 'ARRAY' - ? $params{excludes} - : [ $params{excludes} ]); - } - $class->_new(\%params); } @@ -58,12 +48,12 @@ sub apply { $self->check_role_exclusions(@_); $self->check_required_methods(@_); $self->check_required_attributes(@_); - + $self->apply_attributes(@_); - $self->apply_methods(@_); - + $self->apply_methods(@_); + $self->apply_override_method_modifiers(@_); - + $self->apply_before_method_modifiers(@_); $self->apply_around_method_modifiers(@_); $self->apply_after_method_modifiers(@_); @@ -84,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. @@ -143,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