Don't require there to be a BUILDARGS method; fix undef warning
[gitmo/Mouse.git] / lib / Mouse / Meta / Method / Constructor.pm
index 5b8b5d2..a11479d 100644 (file)
@@ -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(@_)';
     }