Remove numbers from our tests
[gitmo/Moose.git] / t / bugs / constructor_object_overload.t
diff --git a/t/bugs/constructor_object_overload.t b/t/bugs/constructor_object_overload.t
new file mode 100644 (file)
index 0000000..70aaffe
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More;
+
+{
+    package Foo;
+
+    use Moose;
+
+    use overload '""' => sub {''};
+
+    sub bug { 'plenty' }
+
+    __PACKAGE__->meta->make_immutable;
+}
+
+ok(Foo->new()->bug(), 'call constructor on object reference with overloading');
+
+done_testing;