package App::Main; use strict; use warnings; use base qw{CGI::Application}; use App::One; use App::Two; sub setup { my ($self) = @_; $self->start_mode('one'); $self->mode_param(path_info => 1); $self->run_modes([qw{ one two }] ); } sub one { my ($self) = @_; my $one = App::One->new; $one->run; exit; #$self->header_type('none'); } sub two { my ($self) = @_; my $two = App::Two->new; $two->run; exit; #$self->header_type('none'); } 1; #### package App::One; use strict; use warnings; use base qw{CGI::Application}; sub cgiapp_init { my $self = shift; $self->tmpl_path(q{tmpl}); } sub setup { my ($self) = @_; $self->mode_param(path_info => 2); $self->start_mode('one_a'); $self->run_modes([qw( one_a one_b )]); } sub one_a{ my ($self) = @_; my $tmpl = $self->load_tmpl; return $tmpl->output; } sub one_b{ my ($self) = @_; my $tmpl = $self->load_tmpl; return $tmpl->output; } 1; #### #!C:/Perl/bin/perl.exe use strict; use warnings; use lib qw{ /www/local/sw/admin/lib }; use App::Main; my $top = App::Main->new; $top->run; #### index.cgi/one/one_a