Don't break the calling convention for the run method by making the server the last...
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 06130d1..02b5d60 100644 (file)
@@ -2378,6 +2378,10 @@ sub setup_engine {
     unless ($engine) {
         $engine = $class->engine_class;
     }
+    $engine = 'Catalyst::Engine::' . $engine
+        unless $engine =~ /^Catalyst::Engine/;
+
+    $engine = 'Catalyst::Engine' if $engine eq 'Catalyst::Engine::HTTP';
 
     Class::MOP::load_class($engine);