Add support for applying Moose roles in the plugin list
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Role.pm
diff --git a/t/lib/TestApp/Role.pm b/t/lib/TestApp/Role.pm
new file mode 100644 (file)
index 0000000..af02a21
--- /dev/null
@@ -0,0 +1,15 @@
+package TestApp::Role;
+use Moose::Role;
+use namespace::clean -except => 'meta';
+
+requires 'fully_qualified'; # Comes from TestApp::Plugin::FullyQualified
+
+our $SETUP_FINALIZE = 0;
+our $SETUP_DISPATCHER = 0;
+
+before 'setup_finalize' => sub { $SETUP_FINALIZE++ };
+
+before 'setup_dispatcher' => sub { $SETUP_DISPATCHER++ }; 
+
+1;
+