silence warning about redefinition of variable
John Napiorkowski [Thu, 1 May 2014 22:23:15 +0000 (17:23 -0500)]
t/psgi_utils.t

index 9b60926..829d8e3 100644 (file)
@@ -3,6 +3,11 @@ use strict;
 
 # Make it easier to mount PSGI apps under catalyst
 
+my $psgi_app = sub {
+  my $req = Plack::Request->new(shift);
+  return [200,[],[$req->path]];
+};
+
 {
   package MyApp::Controller::Docs;
 
@@ -10,11 +15,6 @@ use strict;
   use Plack::Request;
   use Catalyst::Utils;
 
-  my $psgi_app = sub {
-    my $req = Plack::Request->new(shift);
-    return [200,[],[$req->path]];
-  };
-
   sub name :Local {
     my ($self, $c) = @_;
     my $env = $c->Catalyst::Utils::env_at_action;
@@ -36,11 +36,6 @@ use strict;
   use Plack::Request;
   use Catalyst::Utils;
 
-  my $psgi_app = sub {
-    my $req = Plack::Request->new(shift);
-    return [200,[],[$req->path]];
-  };
-
   sub local_example :Local {
     my ($self, $c) = @_;
     my $env = $self->get_env($c);