1 package TestApp::Controller::Root;
3 use parent 'Catalyst::Controller::WrapCGI';
6 __PACKAGE__->config->{namespace} = '';
11 print 'foo:',$cgi->param('foo'),' bar:',$cgi->param('bar');
12 if (my $fh = $cgi->param('baz')) {
16 if (my $fh = $cgi->param('quux')) {
20 die $cgi->cgi_error if $cgi->cgi_error;
23 sub handle_cgi : Path('/cgi-bin/test.cgi') {
25 $self->cgi_to_response($c, $cgi);
28 sub test_path_info : Path('/cgi-bin/test_pathinfo.cgi') {
31 $self->cgi_to_response($c, sub {
38 sub test_filepath_info : Path('/cgi-bin/test_filepathinfo.cgi') {
41 $self->cgi_to_response($c, sub {
44 print $ENV{FILEPATH_INFO}
48 sub test_script_name_root : Chained('/') PathPart('cgi-bin') CaptureArgs(1) {}
50 sub test_script_name : Chained('test_script_name_root') PathPart('test_scriptname.cgi') Args {
53 $self->cgi_to_response($c, sub {
56 print $ENV{SCRIPT_NAME}
60 sub test_remote_user : Path('/cgi-bin/test_remote_user.cgi') Args(0) {
63 $self->cgi_to_response($c, sub {
66 print $ENV{REMOTE_USER}