projects
/
gitmo/Mouse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
b250019
)
Future-proof init_arg => undef, that needs tests though
Shawn M Moore [Wed, 4 Jun 2008 04:02:45 +0000 (
04:02
+0000)]
lib/Mouse/Attribute.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Mouse/Attribute.pm
b/lib/Mouse/Attribute.pm
index
2c8cc5b
..
325c24d
100644
(file)
--- 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;