From: Dave Rolsky Date: Mon, 7 Sep 2009 19:27:22 +0000 (-0500) Subject: More code tidying X-Git-Tag: 0.89_02~21 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3a4fc1c0a27852ba2db2eb07b3109527943051a4;p=gitmo%2FMoose.git More code tidying --- diff --git a/lib/Moose/Meta/Role/Application.pm b/lib/Moose/Meta/Role/Application.pm index f4e8cd7..cd78b05 100644 --- a/lib/Moose/Meta/Role/Application.pm +++ b/lib/Moose/Meta/Role/Application.pm @@ -23,18 +23,21 @@ __PACKAGE__->meta->add_attribute('method_aliases' => ( sub new { my ($class, %params) = @_; - if (exists $params{excludes} && !exists $params{'-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);