Commit | Line | Data |
457c1d76 |
1 | package TestApp::Controller::Root; |
2 | |
3 | use parent 'Catalyst::Controller::WrapCGI'; |
12d29ebf |
4 | use CGI (); |
457c1d76 |
5 | |
6 | __PACKAGE__->config->{namespace} = ''; |
7 | |
8 | my $cgi = sub { |
12d29ebf |
9 | my $cgi = CGI->new; |
10 | print $cgi->header; |
11 | print 'foo:',$cgi->param('foo'),' bar:',$cgi->param('bar') |
457c1d76 |
12 | }; |
13 | |
14 | sub handle_cgi : Path('/cgi-bin/test.cgi') { |
15 | my ($self, $c) = @_; |
16 | $self->cgi_to_response($c, $cgi); |
17 | } |
18 | |
0d83c5de |
19 | sub test_path_info : Path('/cgi-bin/test_pathinfo.cgi') { |
20 | my ($self, $c) = @_; |
21 | |
22 | $self->cgi_to_response($c, sub { |
23 | my $cgi = CGI->new; |
24 | print $cgi->header; |
25 | print $ENV{PATH_INFO} |
26 | }); |
27 | } |
28 | |
457c1d76 |
29 | 1; |