package MyApp; use strict; use warnings; use base qw(CGI::Application::Plugin::HTCompiled CGI::Application); 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) = @_; return $self->outbox; } sub outbox{ my ($self) = @_; retun "outbox"; }