summaryrefslogtreecommitdiff
path: root/t/bugs/create_anon_recursion.t
diff options
context:
space:
mode:
Diffstat (limited to 't/bugs/create_anon_recursion.t')
-rw-r--r--t/bugs/create_anon_recursion.t29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/bugs/create_anon_recursion.t b/t/bugs/create_anon_recursion.t
new file mode 100644
index 0000000..436048a
--- /dev/null
+++ b/t/bugs/create_anon_recursion.t
@@ -0,0 +1,29 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Fatal;
+
+BEGIN {
+ plan skip_all => "preloading things makes this test meaningless"
+ if exists $INC{'Moose.pm'};
+}
+
+use Moose::Meta::Class;
+
+$SIG{__WARN__} = sub { die if shift =~ /recurs/ };
+
+TODO:
+{
+ local $TODO
+ = 'Loading Moose::Meta::Class without loading Moose.pm causes weird problems';
+
+ my $meta;
+ is( exception {
+ $meta = Moose::Meta::Class->create_anon_class(
+ superclasses => [ 'Moose::Object', ],
+ );
+ }, undef, 'Class is created successfully' );
+}
+
+done_testing;