Skip to content

Commit

Permalink
Revert "server: use to_app"
Browse files Browse the repository at this point in the history
This reverts commit 29bc33e.

trying to isolate a restart issue
(temp. reverting suspicious commits)
  • Loading branch information
mickeyn committed Aug 15, 2016
1 parent 8c1c59c commit 183223d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 2 additions & 3 deletions app.psgi
Expand Up @@ -4,7 +4,6 @@ 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 @@ -15,5 +14,5 @@ if ( $ENV{PLACK_ENV} eq 'development' ) {
}
}

MetaCPAN::Server->to_app;

# The class has the Plack initialization and returns the app.
require MetaCPAN::Server;
5 changes: 2 additions & 3 deletions lib/MetaCPAN/Server.pm
Expand Up @@ -117,6 +117,5 @@ sub to_app {
return $app;
}

1;

__END__
# Let's be explicit because implicit returns can be confusing
return $app;
3 changes: 1 addition & 2 deletions t/lib/MetaCPAN/Server/Test.pm
Expand Up @@ -6,7 +6,6 @@ use warnings;
use HTTP::Request::Common qw(POST GET DELETE);
use Plack::Test;
use Test::More;
use MetaCPAN::Server;

use base 'Exporter';
our @EXPORT = qw(
Expand All @@ -22,7 +21,7 @@ my $app;
sub _load_app {

# Delay loading.
$app ||= MetaCPAN::Server->to_app;
$app ||= require MetaCPAN::Server;
}

sub prepare_user_test_data {
Expand Down

0 comments on commit 183223d

Please sign in to comment.