#!/usr/bin/perl { package TestApp; use base qw(CGI::Application); use CGI qw(:standard); sub setup { my $self = shift; $self->run_modes([qw(start)]); } sub cgiapp_prerun { my $self = shift; print STDERR "calling cgiapp_prerun\n"; $self->param( test => 123 ); } sub start { my $self = shift; my $test = $self->param('test'); print STDERR "test: $test\n"; return qq{

test: $test

}; } } TestApp->new->run;