in reply to Converting to CGI::Application

All of the other responses have been good, but for another (and IMHO, a more C::A) way...
I would use the mode_param() accessor that can also take an anonymous sub.
sub setup { my $self = shift; $self->mode_param(\&_translate_old); } sub _translate_old { my $self = shift; my $query = $self->query(); if( $query->param('page') { return $query->param('page'); } elsif ( $query->param('stats') } return 'stats'; } elsif( $query->param('new') { return 'new'; } }

-- fast, working, cheap - pick two