3092f401589284469a92587f5c00bedac6e0932b
[catagits/Catalyst-Controller-WrapCGI.git] / t / lib / TestCGIBin / Controller / CGIHandler.pm
1 package TestCGIBin::Controller::CGIHandler;
2
3 use parent 'Catalyst::Controller::CGIBin';
4
5 # Turn off log for the non-zero exit test
6 sub auto : Private {
7     my ($self, $c) = @_;
8     $c->log->levels() unless $c->debug;
9     1;
10 }
11
12 sub cgi_path {
13     my ($self, $cgi) = @_;
14     return "my-bin/$cgi";
15 }
16
17 # try out a forward
18 sub dongs : Local Args(0) {
19     my ($self, $c) = @_;
20     $c->forward('/cgihandler/CGI_path__test_pl');
21 }
22
23 # try resolved forward
24 sub mtfnpy : Local Args(0) {
25     my ($self, $c) = @_;
26     $c->forward($self->cgi_action('path/test.pl'));
27 }
28
29 1;