Changed ActionRole to ActionClass
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Action / TestMatchCaptures.pm
diff --git a/t/lib/TestApp/Action/TestMatchCaptures.pm b/t/lib/TestApp/Action/TestMatchCaptures.pm
new file mode 100644 (file)
index 0000000..2d9d167
--- /dev/null
@@ -0,0 +1,18 @@
+package TestApp::Action::TestMatchCaptures;
+
+use Moose;
+
+extends 'Catalyst::Action';
+
+sub match_captures {
+    my ($self, $c, $cap) = @_;
+    if ($cap->[0] eq 'force') {
+        $c->res->header( 'X-TestAppActionTestMatchCaptures', 'forcing' );
+        return 1;
+    } else {
+        $c->res->header( 'X-TestAppActionTestMatchCaptures', 'fallthrough' );
+        return 0;
+    }
+}
+
+1;
\ No newline at end of file