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;