X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole%2FApplication.pm;h=98a346fe7fca3946d357a97ccafacd33bfa94425;hb=70f676ca8f4cff09ab02a06cb979ffe5c59f28f9;hp=e5e6243ba8fb4693a306fadcbe464951cad00c34;hpb=c8b8d92f366e6d9c09c0bb2a54b4f1942fc665ef;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role/Application.pm b/lib/Moose/Meta/Role/Application.pm index e5e6243..98a346f 100644 --- a/lib/Moose/Meta/Role/Application.pm +++ b/lib/Moose/Meta/Role/Application.pm @@ -4,7 +4,7 @@ use strict; use warnings; use metaclass; -our $VERSION = '0.89'; +our $VERSION = '1.10'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -23,18 +23,29 @@ __PACKAGE__->meta->add_attribute('method_aliases' => ( sub new { my ($class, %params) = @_; - if (exists $params{excludes} && !exists $params{'-excludes'}) { + 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'}) { + if ( exists $params{alias} && !exists $params{'-alias'} ) { $params{'-alias'} = delete $params{alias}; } - if (exists $params{'-excludes'}) { + if ( exists $params{'-excludes'} ) { + # I wish we had coercion here :) - $params{'-excludes'} = (ref $params{'-excludes'} eq 'ARRAY' - ? $params{'-excludes'} - : [ $params{'-excludes'} ]); + $params{'-excludes'} = ( + ref $params{'-excludes'} eq 'ARRAY' + ? $params{'-excludes'} + : [ $params{'-excludes'} ] + ); } $class->_new(\%params); @@ -150,9 +161,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. +See L for details on reporting bugs. =head1 AUTHOR @@ -160,7 +169,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006-2009 by Infinity Interactive, Inc. +Copyright 2006-2010 by Infinity Interactive, Inc. L