allow overriding of public cgi-bin paths
[catagits/Catalyst-Controller-WrapCGI.git] / t / lib / TestCGIBin / Controller / CGIHandler.pm
index 41e20f5..0e18ee6 100644 (file)
@@ -2,16 +2,21 @@ package TestCGIBin::Controller::CGIHandler;
 
 use parent 'Catalyst::Controller::CGIBin';
 
+sub cgi_path {
+    my ($self, $cgi) = @_;
+    return "my-bin/$cgi";
+}
+
 # try out a forward
 sub dongs : Local Args(0) {
     my ($self, $c) = @_;
-    $c->forward('/cgihandler/CGI_test_pl');
+    $c->forward('/cgihandler/CGI_path_test_pl');
 }
 
 # try resolved forward
 sub mtfnpy : Local Args(0) {
     my ($self, $c) = @_;
-    $c->forward($self->cgi_action('test.pl'));
+    $c->forward($self->cgi_action('path/test.pl'));
 }
 
 1;