Skip to content

Commit

Permalink
Update Applcation.pm - Add runmode, subsequent fix
Browse files Browse the repository at this point in the history
Edit to commit, ensure output of no_runmodes outputs valud HTML, as per:

#16
  • Loading branch information
MartinMcGrath committed Apr 27, 2014
1 parent 7849b4c commit 93081cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/CGI/Application.pm
Expand Up @@ -383,19 +383,22 @@ sub no_runmodes {

my $self = shift;
my $query = $self->query();
my $output = $query->start_html;

# If no runmodes specified by app return error message
my $current_runmode = $self->get_current_runmode();
my $query_params = $query->Dump;

my $output = qq{
$output .= qq{
<h2>Error - No runmodes specified.</h2>
<p>Runmode called: $current_runmode"</p>
<p>Query paramaters:</p> $query_params
<p>Your application has not specified any runmodes.</p>
<p>Please read the <a href="http://search.cpan.org/~markstos/CGI-Appli
cation/">CGI::Application</a> documentation.</p>
};

$output .= $query->end_html();
return $output;
}

Expand Down

0 comments on commit 93081cf

Please sign in to comment.