New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop load_psgi from searching .psgi files from @INC #343
Conversation
…e args. This might break users who installs `foo.psgi` into @inc directories and expect `plackup foo.psgi` to load them from there - it's been a mix of documented (loading class names like MyApp::PSGI) and undocumented feature anyways.
@plack/core care to take a look? |
+1 from me, this does seem like unexpected behavior. The other option |
+1 here, and -1 for pushing . onto @inc - this just adds more magic.. |
Stop load_psgi from searching .psgi files from @inc
This change breaks Catalyst on Windows :( C:\Sites\Test\script>perl64 test_server.pl Using ActiveState Perl 5.16 64bit on Windows 2008R2 64bit and IIS 7.5 and Plack 1.0007 and Catalyst 5.90016. Is it possible to change line 128 of lib/Plack/Util.pm to:
|
What's the content of |
The default Catalyst generates: BEGIN { $ENV{CATALYST_SCRIPT_GEN} = 40; } use Catalyst::ScriptRunner; Catalyst::ScriptRunner->run('Test', 'Server'); 1; |
The problem is unlike Linux, Windows has drive letters and "./C:" is an invalid path. |
Changelog diff is: diff --git a/Changes b/Changes index 76d3cd1..6e958c6 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Go to http://github.com/plack/Plack/issues for the roadmap and known issues. +1.0008 Mon Oct 22 18:52:29 PDT 2012 + [BUG FIXES] + - Allow drive letters for absolute paths for plackup and load_psgi #343 + 1.0007 Sat Oct 20 23:20:20 PDT 2012 [IMPROVEMENTS] - Fix test failures with HTTP::Message 6.06. #345
Changelog diff is: diff --git a/Changes b/Changes index 6e958c6..1823d91 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Go to http://github.com/plack/Plack/issues for the roadmap and known issues. +1.0009 Tue Oct 23 00:57:16 PDT 2012 + [BUG FIXES] + - Correct fix to address drive letters for Win32 + 1.0008 Mon Oct 22 18:52:29 PDT 2012 [BUG FIXES] - Allow drive letters for absolute paths for plackup and load_psgi #343
Changelog diff is: diff --git a/Changes b/Changes index f7ced00..13330ff 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,17 @@ Go to http://github.com/plack/Plack/issues for the roadmap and known issues. +1.0006 Thu Oct 18 16:06:15 PDT 2012 + [INCOMPATIBLE CHANGES] + - plackup foo.psgi will not search the file in @inc anymore before the current directory + See plack#343 for details (miyagawa) + + [NEW FEATURES] + - plackup --path /foo will mount the application under /path (mattn) + + [BUG FIXES] + - AccessLog: Fix the timezon offset for certain timezones + - ErrorDocument: support streaming interface + 1.0005 Tue Oct 9 13:33:47 PDT 2012 [NEW FEATURES] - Support psgix.cleanup handlers in Apache2 (avar)
Upstream changes: 1.0015 Thu Jan 10 15:19:17 PST 2013 [BUG FIXES] - Fixed Lint complaining about Latin-1 range characters stored internally with utf8 flag on (Mark Fowler) - HTTP::Message::PSGI::res_from_psgi now always returns empty string for an empty response body, so streamed responses are consistent with non-streamed (ether) 1.0014 Mon Dec 3 10:27:43 PST 2012 [BUG FIXES] - Fixed Hash order in tests for perl 5.17 (doy) - Fixed StackTrace tests to run with Devel::StackTrace [IMPROVEMENTS] - Plack::Middleware::AccessLog can now log the worker pid and server port (ether) 1.0013 Wed Nov 14 19:46:49 PST 2012 [BUG FIXES] - Make sure psgi.input is seeked even when the input is buffered (Getty, leedo) - Delete invalid (empty) CONTENT_LENGTH and CONTENT_TYPE in FCGI (Getty, leedo) 1.0012 Wed Nov 14 12:00:17 PST 2012 [IMPROVEMENTS] - Make conditional middleware work with initialization without an app (doy) - Added force option to BufferedStreaming 1.0011 Sun Nov 11 11:05:30 PST 2012 [BUG FIXES] - Fix bad Content-Length that could be caused with mod_perl (avar) - Allow an empty PATH_INFO in Lint per PSGI spec 1.0010 Fri Nov 2 13:30:50 PDT 2012 [IMPROVEMENTS] - Added vim .swp files to the default ignore list in Restarter - Check if PATH_INFO begins with / in Lint 1.0009 Tue Oct 23 00:57:16 PDT 2012 [BUG FIXES] - Correct fix to address drive letters for Win32 1.0008 Mon Oct 22 18:52:29 PDT 2012 [BUG FIXES] - Allow drive letters for absolute paths for plackup and load_psgi #343 1.0007 Sat Oct 20 23:20:20 PDT 2012 [IMPROVEMENTS] - Fix test failures with HTTP::Message 6.06. #345 - relaxed plackup -R ignore files and directoris. #260 1.0006 Thu Oct 18 16:06:15 PDT 2012 [INCOMPATIBLE CHANGES] - plackup foo.psgi will not search the file in @inc anymore before the current directory See plack/Plack#343 for details (miyagawa) [NEW FEATURES] - plackup --path /foo will mount the application under /path (mattn) [BUG FIXES] - AccessLog: Fix the timezon offset for certain timezones - ErrorDocument: support streaming interface 1.0005 Tue Oct 9 13:33:47 PDT 2012 [NEW FEATURES] - Support psgix.cleanup handlers in Apache2 (avar) - Added REMOTE_PORT environment variable to HTTP::Server::PSGI (dex4er) [IMPROVEMENTS] - Documentation fix for multiple cookie values (miyagawa) - Delete MOD_PERL environment variable for better compatibilities (avar) - Split out Plack::TempBuffer as a standalone Stream::Buffered module (doy) - Bump Test::TCP dep 1.0004 Thu Sep 20 08:36:11 JST 2012 [NEW FEATURES] - Added psgix.harakiri support in HTTP::Server::PSGI [IMPROVEMENTS] - Preload TempBuffer modules (avar) - Documentation fixes (autarch)
Upstream changes: 1.0015 Thu Jan 10 15:19:17 PST 2013 [BUG FIXES] - Fixed Lint complaining about Latin-1 range characters stored internally with utf8 flag on (Mark Fowler) - HTTP::Message::PSGI::res_from_psgi now always returns empty string for an empty response body, so streamed responses are consistent with non-streamed (ether) 1.0014 Mon Dec 3 10:27:43 PST 2012 [BUG FIXES] - Fixed Hash order in tests for perl 5.17 (doy) - Fixed StackTrace tests to run with Devel::StackTrace [IMPROVEMENTS] - Plack::Middleware::AccessLog can now log the worker pid and server port (ether) 1.0013 Wed Nov 14 19:46:49 PST 2012 [BUG FIXES] - Make sure psgi.input is seeked even when the input is buffered (Getty, leedo) - Delete invalid (empty) CONTENT_LENGTH and CONTENT_TYPE in FCGI (Getty, leedo) 1.0012 Wed Nov 14 12:00:17 PST 2012 [IMPROVEMENTS] - Make conditional middleware work with initialization without an app (doy) - Added force option to BufferedStreaming 1.0011 Sun Nov 11 11:05:30 PST 2012 [BUG FIXES] - Fix bad Content-Length that could be caused with mod_perl (avar) - Allow an empty PATH_INFO in Lint per PSGI spec 1.0010 Fri Nov 2 13:30:50 PDT 2012 [IMPROVEMENTS] - Added vim .swp files to the default ignore list in Restarter - Check if PATH_INFO begins with / in Lint 1.0009 Tue Oct 23 00:57:16 PDT 2012 [BUG FIXES] - Correct fix to address drive letters for Win32 1.0008 Mon Oct 22 18:52:29 PDT 2012 [BUG FIXES] - Allow drive letters for absolute paths for plackup and load_psgi #343 1.0007 Sat Oct 20 23:20:20 PDT 2012 [IMPROVEMENTS] - Fix test failures with HTTP::Message 6.06. #345 - relaxed plackup -R ignore files and directoris. #260 1.0006 Thu Oct 18 16:06:15 PDT 2012 [INCOMPATIBLE CHANGES] - plackup foo.psgi will not search the file in @inc anymore before the current directory See plack/Plack#343 for details (miyagawa) [NEW FEATURES] - plackup --path /foo will mount the application under /path (mattn) [BUG FIXES] - AccessLog: Fix the timezon offset for certain timezones - ErrorDocument: support streaming interface 1.0005 Tue Oct 9 13:33:47 PDT 2012 [NEW FEATURES] - Support psgix.cleanup handlers in Apache2 (avar) - Added REMOTE_PORT environment variable to HTTP::Server::PSGI (dex4er) [IMPROVEMENTS] - Documentation fix for multiple cookie values (miyagawa) - Delete MOD_PERL environment variable for better compatibilities (avar) - Split out Plack::TempBuffer as a standalone Stream::Buffered module (doy) - Bump Test::TCP dep 1.0004 Thu Sep 20 08:36:11 JST 2012 [NEW FEATURES] - Added psgix.harakiri support in HTTP::Server::PSGI [IMPROVEMENTS] - Preload TempBuffer modules (avar) - Documentation fixes (autarch)
Upstream changes: 1.0015 Thu Jan 10 15:19:17 PST 2013 [BUG FIXES] - Fixed Lint complaining about Latin-1 range characters stored internally with utf8 flag on (Mark Fowler) - HTTP::Message::PSGI::res_from_psgi now always returns empty string for an empty response body, so streamed responses are consistent with non-streamed (ether) 1.0014 Mon Dec 3 10:27:43 PST 2012 [BUG FIXES] - Fixed Hash order in tests for perl 5.17 (doy) - Fixed StackTrace tests to run with Devel::StackTrace [IMPROVEMENTS] - Plack::Middleware::AccessLog can now log the worker pid and server port (ether) 1.0013 Wed Nov 14 19:46:49 PST 2012 [BUG FIXES] - Make sure psgi.input is seeked even when the input is buffered (Getty, leedo) - Delete invalid (empty) CONTENT_LENGTH and CONTENT_TYPE in FCGI (Getty, leedo) 1.0012 Wed Nov 14 12:00:17 PST 2012 [IMPROVEMENTS] - Make conditional middleware work with initialization without an app (doy) - Added force option to BufferedStreaming 1.0011 Sun Nov 11 11:05:30 PST 2012 [BUG FIXES] - Fix bad Content-Length that could be caused with mod_perl (avar) - Allow an empty PATH_INFO in Lint per PSGI spec 1.0010 Fri Nov 2 13:30:50 PDT 2012 [IMPROVEMENTS] - Added vim .swp files to the default ignore list in Restarter - Check if PATH_INFO begins with / in Lint 1.0009 Tue Oct 23 00:57:16 PDT 2012 [BUG FIXES] - Correct fix to address drive letters for Win32 1.0008 Mon Oct 22 18:52:29 PDT 2012 [BUG FIXES] - Allow drive letters for absolute paths for plackup and load_psgi #343 1.0007 Sat Oct 20 23:20:20 PDT 2012 [IMPROVEMENTS] - Fix test failures with HTTP::Message 6.06. #345 - relaxed plackup -R ignore files and directoris. #260 1.0006 Thu Oct 18 16:06:15 PDT 2012 [INCOMPATIBLE CHANGES] - plackup foo.psgi will not search the file in @inc anymore before the current directory See plack/Plack#343 for details (miyagawa) [NEW FEATURES] - plackup --path /foo will mount the application under /path (mattn) [BUG FIXES] - AccessLog: Fix the timezon offset for certain timezones - ErrorDocument: support streaming interface 1.0005 Tue Oct 9 13:33:47 PDT 2012 [NEW FEATURES] - Support psgix.cleanup handlers in Apache2 (avar) - Added REMOTE_PORT environment variable to HTTP::Server::PSGI (dex4er) [IMPROVEMENTS] - Documentation fix for multiple cookie values (miyagawa) - Delete MOD_PERL environment variable for better compatibilities (avar) - Split out Plack::TempBuffer as a standalone Stream::Buffered module (doy) - Bump Test::TCP dep 1.0004 Thu Sep 20 08:36:11 JST 2012 [NEW FEATURES] - Added psgix.harakiri support in HTTP::Server::PSGI [IMPROVEMENTS] - Preload TempBuffer modules (avar) - Documentation fixes (autarch)
If you have
foo.psgi
in any of your@INC
paths, runningplackup foo.psgi
used to try to load the one in there first rather than the current directory, which is listed as the last entry of include paths with usual perl.This would confuse users potentially. With this change
load_psgi
function in Plack::Util does a little more DWIMmery to make it into./foo.psgi
unless the given path begins with / (slash).Arguably this might break some users, who uses this feature for their CPAN modules to install PSGI scripts into
@INC
expecting it to be picked up byplackup foo.psgi
. That will stop working, although we never recommended it, and if they have a module (not a script) likeMyApp::PSGI
into include paths that will keep working.