unsupport passing meta-attr object to triggers because (a) it's not tested (b) it...
Matt S Trout [Tue, 9 Dec 2008 22:06:59 +0000 (22:06 +0000)]
lib/Moose/Meta/Method/Accessor.pm
lib/Moose/Meta/Method/Constructor.pm

index 879c018..d93e080 100644 (file)
@@ -228,7 +228,7 @@ sub _inline_trigger {
     my ($self, $instance, $value) = @_;
     my $attr = $self->associated_attribute;
     return '' unless $attr->has_trigger;
-    return sprintf('$attr->trigger->(%s, %s, $attr);', $instance, $value);
+    return sprintf('$attr->trigger->(%s, %s);', $instance, $value);
 }
 
 sub _inline_get {
index 91da69e..a52937b 100644 (file)
@@ -222,8 +222,6 @@ sub _generate_triggers {
                                  '$instance',
                                  ("'" . $attr->name . "'")
                              ) 
-                             . ', '
-                    .        '$attrs->[' . $i . ']'
                     .   ');'
                     ."\n}"
                 );