package MyApp; use strict; use warnings; use base qw(CGI::Application::Plugin::HTCompiled CGI::Application); use CGI::Application::Plugin::Redirect; sub setup{ my ($self) = @_; $self->start_mode( 'box' ); $self->mode_param( 'rm' ); $self->run_modes( AUTOLOAD => \&error, outbox => \&outbox, inbox => \&inbox, ); } sub inbox{ my ($self) = @_; my $url = 'http://localhost/skript.cgi?rm=outbox'; $self->redirect( $url ); } sub outbox{ my ($self) = @_; retun "outbox"; }