Test case for a way to make C3 crap itself by partially using Moose + fix.
[catagits/Catalyst-Runtime.git] / t / c3_appclass_bug.t
diff --git a/t/c3_appclass_bug.t b/t/c3_appclass_bug.t
new file mode 100644 (file)
index 0000000..0e5f7ed
--- /dev/null
@@ -0,0 +1,30 @@
+use strict;
+use Test::More tests => 1;
+
+{
+    package TestPlugin;
+    use strict;
+
+    sub setup {
+        shift->maybe::next::method(@_);
+    }
+}
+{
+    package TestAppC3ErrorUseMoose;
+    use Moose;
+
+    use Catalyst::Runtime 5.80;
+
+    use base qw/Catalyst/;
+    use Catalyst qw/
+        +TestPlugin
+    /;
+}
+
+use Test::Exception;
+lives_ok {
+    TestAppC3ErrorUseMoose->setup();
+} 'No C3 error';
+
+1;
+