projects
/
gitmo/Mouse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
a22b1fe
)
Back out the exists($_[1]) change since exists($array[$element]) doesn't
Shawn M Moore [Thu, 5 Feb 2009 16:31:39 +0000 (16:31 +0000)]
work so well for undef in @_
lib/Mouse/Meta/Attribute.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Mouse/Meta/Attribute.pm
b/lib/Mouse/Meta/Attribute.pm
index
dec1300
..
9683342
100644
(file)
--- a/
lib/Mouse/Meta/Attribute.pm
+++ b/
lib/Mouse/Meta/Attribute.pm
@@
-75,7
+75,7
@@
sub generate_accessor {
my $accessor = "sub {\n";
if ($attribute->_is_metadata eq 'rw') {
- $accessor .= 'if (exists $_[1]) {' . "\n";
+ $accessor .= 'if (@_ >= 2) {' . "\n";
my $value = '$_[1]';