sub show_form { my $c = shift ; my $status = status() ; my $message = get_message() ; my $service_name = '' # where do you get this from?!? my $template = HTML::Template->new(filename => 'form.tmpl'); $template->param( service_name => $service_name, status => $status, message => $message, ); reset_message; # shouldn't you use parens here? my $resp = HTTP::Response->new ; $resp->content($template->output) ; $c->send_response($resp) ; }