Finished first version of WrapCGI dist
[catagits/Catalyst-Controller-WrapCGI.git] / t / lib / TestApp / Controller / Root.pm
diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm
new file mode 100644 (file)
index 0000000..5f479bb
--- /dev/null
@@ -0,0 +1,19 @@
+package TestApp::Controller::Root;
+
+use parent 'Catalyst::Controller::WrapCGI';
+
+__PACKAGE__->config->{namespace} = '';
+
+my $cgi = sub {
+    use CGI ':standard';
+
+    print header;
+    print 'foo:',param('foo'),' bar:',param('bar')
+};
+
+sub handle_cgi : Path('/cgi-bin/test.cgi') {
+    my ($self, $c) = @_;
+    $self->cgi_to_response($c, $cgi);
+}
+
+1;