- removed C::E::Server
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 26047c3..328a358 100644 (file)
@@ -146,6 +146,10 @@ sub import {
         push @{"$caller\::ISA"}, $self;
     }
 
+    if ( $caller->engine ) {
+        return; # Catalyst is allready initialized
+    }
+
     unless ( $caller->log ) {
         $caller->log( Catalyst::Log->new );
     }
@@ -190,6 +194,13 @@ sub import {
     # Engine
     $engine = "Catalyst::Engine::$ENV{CATALYST_ENGINE}"
       if $ENV{CATALYST_ENGINE};
+
+    if ( $engine eq 'Catalyst::Engine::Server' ) {
+        $engine = 'Catalyst::Engine::HTTP::Daemon';
+        $caller->log->warn(  "Catalyst::Engine::Server is deprecated, "
+                           . "using Catalyst::Engine::HTTP::Daemon." );
+    }
+
     $engine->require;
     die qq/Couldn't load engine "$engine", "$@"/ if $@;
     {