Add test for infinite recursion when creating an anon class with Moose::Object
Guillermo Roditi [Mon, 1 Jun 2009 21:25:34 +0000 (17:25 -0400)]
as the superclass

t/100_bugs/026_create_anon_seep_recursion.t [new file with mode: 0644]

diff --git a/t/100_bugs/026_create_anon_seep_recursion.t b/t/100_bugs/026_create_anon_seep_recursion.t
new file mode 100644 (file)
index 0000000..44a9676
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/perl -w
+
+use strict;
+use Test::More tests => 1;
+use Test::Exception;
+use Moose::Meta::Class;
+
+$SIG{__WARN__} = sub { die if shift =~ /recurs/ };
+
+my $meta;
+lives_ok {
+  $meta = Moose::Meta::Class->create_anon_class(
+    superclasses => [ 'Moose::Object', ],
+  );
+} 'Class is created successfully';