From: Shawn M Moore Date: Wed, 4 Jun 2008 04:02:45 +0000 (+0000) Subject: Future-proof init_arg => undef, that needs tests though X-Git-Tag: 0.04~99 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ee01d77a48acfaaf20e6c2488781344953dec78;p=gitmo%2FMouse.git Future-proof init_arg => undef, that needs tests though --- diff --git a/lib/Mouse/Attribute.pm b/lib/Mouse/Attribute.pm index 2c8cc5b..325c24d 100644 --- a/lib/Mouse/Attribute.pm +++ b/lib/Mouse/Attribute.pm @@ -9,7 +9,8 @@ sub new { my $class = shift; my %args = @_; - $args{init_arg} ||= $args{name}; + $args{init_arg} = $args{name} + unless exists $args{init_arg}; $args{is} ||= ''; bless \%args, $class;