You could just refer to the same sub more than once:
my %dispatch = (
home => \&default,
donate => \&default,
news => \&default,
samp => sub { \&samples($dbh) },
...
);
$action = $apr->param('a');
$action = 'home' if !exists $dispatch{$action};
$dispatch{$action}->($action);
sub default {
my ($action, $params) = @_;
return render_template($action, $params);
}
sub samples {
my ($action, $dbh) = shift;
...
}
Shortcut:
my %dispatch = (
(map { $_ => \&default } qw(
home donate news
)),
samp => sub { \&samples($dbh) },
...
);