Start making the path handling like it is in trunk. Merge extra tests, add using...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / ScriptRole.pm
index af47fd2..4d93e57 100644 (file)
@@ -1,9 +1,9 @@
 package Catalyst::ScriptRole;
 use Moose::Role;
-use Plack::Runner;
 use MooseX::Types::Moose qw/Str Bool/;
 use Pod::Usage;
 use MooseX::Getopt;
+use Plack::Loader;
 use namespace::autoclean;
 
 with 'MooseX::Getopt' => {
@@ -72,7 +72,7 @@ sub _run_application {
     else {
         $server = Plack::Loader->auto($self->_plack_loader_args);
     }
-    $app->run($server, $self->_application_args);
+    $app->run($self->_application_args, $server);
 }
 
 1;