Permalink
Browse files

update CGI::App example

  • Loading branch information...
1 parent 1500e2f commit 421a70734b00af527eb3a8b31e2c68fcacd84f09 @miyagawa miyagawa committed with yanick Sep 13, 2009
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/CGI/PSGI.pm
View
@@ -52,18 +52,15 @@ reference during the lifetime of your application.
For instance with L<CGI::Application>,
use MyApp; # is a CGI::Application app
+ use CGI::Application::PSGI;
- use CGI::PSGI;
my $app = sub {
my $env = shift;
local *ENV = $env;
$ENV{CGI_APP_RETURN_ONLY} = 1;
my $webapp = MyApp->new;
- my $body = $webapp->run;
-
- my($status, $header) = $webapp->query->header;
- return [ $status, $header, [ $body ] ];
+ CGI::Application::PSGI->run($webapp);
};
=head1 AUTHOR

0 comments on commit 421a707

Please sign in to comment.