Skip to content

Commit c567398

Browse files
committedJan 27, 2012
use parent instead of Moose, finalize the response before returning it.
1 parent ba70198 commit c567398

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎wre/lib/WRE/WebguiDemo.pm

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ use WebGUI::Config;
1919
use WRE::Config;
2020
use WRE::File;
2121
use WRE::Mysql;
22+
use Moose;
2223

23-
extends 'Plack::Component';
24+
use parent 'Plack::Component';
2425
use Plack::Util::Accessor qw/wre_config/;
2526

2627
#-------------------------------------------------------------------
@@ -31,7 +32,7 @@ sub call {
3132
my $r = Plack::Request->new($env);
3233
my ($id) = $r->uri->host =~ m/^\/(demo[0-9\_]+).*$/;
3334
my $webgui_config = $config->getWebguiRoot("/etc/".$id.".conf");
34-
$self->response($response);
35+
my $response;
3536
if (-e $webgui_config) {
3637
## Code to use the WebGUI App with a particular config file.
3738
local $ENV{WEBGUI_CONFIG} = $webgui_config;
@@ -46,6 +47,7 @@ sub call {
4647
else {
4748
$response = $self->prompt_demo();
4849
}
50+
return $response->finalize;
4951
}
5052

5153

0 commit comments

Comments
 (0)
Please sign in to comment.