X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngineLoader.pm;h=36cf0168b5b27ef1dfca243cc860911cc14e2719;hb=89222c2a9136170aa4012fbf3c7b804abeff2463;hp=818b9f0228de0cd67a59418b30a39b0f91898594;hpb=86c4012a832d62f49efd30e6637289332e749c1e;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/EngineLoader.pm b/lib/Catalyst/EngineLoader.pm index 818b9f0..36cf016 100644 --- a/lib/Catalyst/EngineLoader.pm +++ b/lib/Catalyst/EngineLoader.pm @@ -39,7 +39,20 @@ sub _guess_catalyst_engine_class { if (!defined $old_engine) { return 'Catalyst::Engine'; } - elsif ($old_engine =~ /^(PSGI|CGI|FastCGI|HTTP|Apache.*)$/) { + elsif ($old_engine eq 'PSGI') { + ## If we are running under plackup let the Catalyst::Engine::PSGI + ## continue to run, but warn. + warn <<"EOW"; +You are running Catalyst::Engine::PSGI, which is considered a legacy engine for +this version of Catalyst. We will continue running and use your existing psgi +file, but it is recommended to perform the trivial upgrade process, which will +leave you with less code and a forward path. + +Please review Catalyst::Upgrading +EOW + return 'Catalyst::Engine::' . $old_engine; + } + elsif ($old_engine =~ /^(CGI|FastCGI|HTTP|Apache.*)$/) { return 'Catalyst::Engine'; } else { @@ -82,10 +95,15 @@ around guess => sub { my $old_engine = Catalyst::Utils::env_value($self->application_name, 'ENGINE'); if (!defined $old_engine) { # Not overridden } - elsif ($old_engine =~ /^(PSGI|CGI|FastCGI|HTTP|Apache.*)$/) { ->>>>>>> Fix bug stopping fastcgi script working + elsif ($old_engine =~ /^(PSGI|CGI|Apache.*)$/) { # Trust autodetect } + elsif ($old_engine eq 'HTTP') { + $engine = 'Standalone'; + } + elsif ($old_engine eq 'FastCGI') { + $engine = 'FCGI'; + } elsif ($old_engine eq "HTTP::Prefork") { # Too bad if you're customising, we don't handle options # write yourself a script to collect and pass in the options $engine = "Starman";