demonstrate weird buildargs error
[gitmo/Moo.git] / t / buildargs-error.t
diff --git a/t/buildargs-error.t b/t/buildargs-error.t
new file mode 100644 (file)
index 0000000..85afbe8
--- /dev/null
@@ -0,0 +1,21 @@
+use strictures 1;
+use Test::More;
+
+{
+    package Foo;
+    use Moo;
+
+    has bar => ( is => "rw" );
+    has baz => ( is => "rw" );
+
+    sub BUILDARGS {
+        my ($self, $args) = @_;
+
+        return %$args
+    }
+}
+
+my $f = Foo->new({ bar => 1, baz => 1 });
+
+done_testing;
+