TODO package A;our @VERSION passing is_class_loaded
[gitmo/Mouse.git] / lib / Mouse / Meta / Method / Constructor.pm
index 5b8b5d2..8b3f3a1 100644 (file)
@@ -64,7 +64,7 @@ sub _generate_processattrs {
             }
 
             if ($attr->has_trigger) {
-                $code .= "\$attrs[$index]->{trigger}->( \$instance, \$value, \$attrs[$index] );\n";
+                $code .= "\$attrs[$index]->{trigger}->( \$instance, \$value );\n";
             }
 
             $code .= "\n} else {\n";
@@ -136,7 +136,7 @@ sub _generate_BUILDARGS {
     my $self = shift;
     my $meta = shift;
 
-    if ($meta->name->can('BUILDARGS') != Mouse::Object->can('BUILDARGS')) {
+    if ($meta->name->can('BUILDARGS') && $meta->name->can('BUILDARGS') != Mouse::Object->can('BUILDARGS')) {
         return '$class->BUILDARGS(@_)';
     }