From: gfx Date: Tue, 3 Nov 2009 02:24:38 +0000 (+0900) Subject: Remove useless use of or-assign X-Git-Tag: 0.40_06~42 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5132ec428048d13768f6bb012b779b991c45658e;p=gitmo%2FMouse.git Remove useless use of or-assign --- diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index d590b0c..da61cc4 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -17,9 +17,9 @@ sub destructor_class() { 'Mouse::Meta::Method::Destructor' } sub _construct_meta { my($class, %args) = @_; - $args{attributes} ||= {}; - $args{methods} ||= {}; - $args{roles} ||= []; + $args{attributes} = {}; + $args{methods} = {}; + $args{roles} = []; $args{superclasses} = do { no strict 'refs'; diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm index 6bdfb4c..cd7fdd8 100644 --- a/lib/Mouse/Meta/Role.pm +++ b/lib/Mouse/Meta/Role.pm @@ -11,10 +11,10 @@ sub _construct_meta { my %args = @_; - $args{methods} ||= {}; - $args{attributes} ||= {}; - $args{required_methods} ||= []; - $args{roles} ||= []; + $args{methods} = {}; + $args{attributes} = {}; + $args{required_methods} = []; + $args{roles} = []; my $self = bless \%args, ref($class) || $class; if($class ne __PACKAGE__){