X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=b2a966e6d045e8d79b18ded242558d96d8c7842f;hb=d54484bfe5854092f3f1e8454c447569854d8df5;hp=f1f2ebe96254d3cba94f899a4ed8cdea6d3b5170;hpb=a9dc674c99f36ff40d94b80753a1504074ba5e22;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index f1f2ebe..b2a966e 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1468,7 +1468,39 @@ sub setup_engine { qq/Couldn't load engine "$engine" (maybe you forgot to install it?), "$@"/ ); } + + # check for old engines that are no longer compatible + my $old_engine; + if ( $engine->isa('Catalyst::Engine::Apache') + && ! Catalyst::Engine::Apache->VERSION ) + { + $old_engine = 1; + } + + elsif ( $engine->isa('Catalyst::Engine::Server::Base') + && Catalyst::Engine::Server->VERSION le '0.02' ) + { + $old_engine = 1; + } + + elsif ( $engine->isa('Catalyst::Engine::HTTP::POE') + && $engine->VERSION eq '0.01' ) + { + $old_engine = 1; + } + + elsif ( $engine->isa('Catalyst::Engine::Zeus') + && $engine->VERSION eq '0.01' ) + { + $old_engine = 1; + } + if ($old_engine) { + Catalyst::Exception->throw( message => + qq/Engine "$engine" is not supported by this version of Catalyst/ + ); + } + # engine instance $class->engine( $engine->new ); }