[Moose-commits] r7556 - Mouse/trunk/lib/Mouse/Meta
sartak at code2.0beta.co.uk
sartak at code2.0beta.co.uk
Thu Feb 5 16:31:40 GMT 2009
Author: sartak
Date: 2009-02-05 08:31:39 -0800 (Thu, 05 Feb 2009)
New Revision: 7556
Modified:
Mouse/trunk/lib/Mouse/Meta/Attribute.pm
Log:
Back out the exists($_[1]) change since exists($array[$element]) doesn't
work so well for undef in @_
Modified: Mouse/trunk/lib/Mouse/Meta/Attribute.pm
===================================================================
--- Mouse/trunk/lib/Mouse/Meta/Attribute.pm 2009-02-05 07:35:55 UTC (rev 7555)
+++ Mouse/trunk/lib/Mouse/Meta/Attribute.pm 2009-02-05 16:31:39 UTC (rev 7556)
@@ -75,7 +75,7 @@
my $accessor = "sub {\n";
if ($attribute->_is_metadata eq 'rw') {
- $accessor .= 'if (exists $_[1]) {' . "\n";
+ $accessor .= 'if (@_ >= 2) {' . "\n";
my $value = '$_[1]';
More information about the Moose-commits
mailing list