Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
server: use to_app
  • Loading branch information
mickeyn committed Aug 14, 2016
1 parent 754782c commit 827f4dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app.psgi
Expand Up @@ -4,6 +4,7 @@ use warnings;
use FindBin;
use lib "$FindBin::RealBin/lib";
use Catalyst::Middleware::Stash 'stash';
use MetaCPAN::Server;

if ( $ENV{PLACK_ENV} eq 'development' ) {

Expand All @@ -14,5 +15,5 @@ if ( $ENV{PLACK_ENV} eq 'development' ) {
}
}

# The class has the Plack initialization and returns the app.
require MetaCPAN::Server;
MetaCPAN::Server->to_app;

5 changes: 3 additions & 2 deletions lib/MetaCPAN/Server.pm
Expand Up @@ -117,5 +117,6 @@ sub to_app {
return $app;
}

# Let's be explicit because implicit returns can be confusing
return $app;
1;

__END__

0 comments on commit 827f4dd

Please sign in to comment.