NAME

Plack::Middleware::Apache2EnvironmentFix - Hacks for Plack under Apache2

DESCRIPTION

When migrating your mod_perl site to run under Plack, you may wish to move part of your site to Plack at a time, rather than all at once.

In this situation, your Perl modules will be compiled under mod_perl in Apache's startup.pl, but then run under Plack. Commonly used modules such as CGI have optimizations for mod_perl environments, and certain things like redirects will fail to work under Plack.

This middleware performs some ugly hacks to the Apache environment, allowing all this to work.

If you are running your entire site under Plack, then this middleware should become unnecessary, because all CPAN modules will be preloaded in a Plack environment, where $ENV{MOD_PERL} is not set.

CAVEATS

Did I mention ugly hacks? This includes overriding variables internal to CGI and CGI::Cookie.

Your milage may vary; this middleware does not necessarily override all the modules on CPAN.

SEE ALSO

https://groups.google.com/d/msg/psgi-plack/HWrjb3DaZlk/27mQCxmf0r0J

COPYRIGHT AND LICENSE

Copyright (C) 2014 CV-Library Ltd.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.