CGI::Application::Plugin::AutoRunmode is a welcome simplification to the common CGI::Application workflow.
It allows you to get rid of setup() while maintaining clarity. An illustration:
before:sub setup { my $self = shift; $self->start_mode('my_run_mode'); $self->runmodes(qw/ my_run_mode another_run_mode /); } sub my_run_mode { # do something here } sub another_run_mode { # do something else }After:
use CGI::Application::Plugin::AutoRunmode; sub my_run_mode : StartRunmode { # do something here } sub another_run_mode : Runmode { # do something else }