Plack::Middleware::ForceEnv - Force set environment variables for testing
# in app.psgi use Plack::Builder; builder { enable 'ForceEnv' => REMOTE_ADDR => "127.0.0.1", REMOTE_USER => "trs"; $app; }; # with plackup plackup -e 'enable ForceEnv => REMOTE_USER => "trs"' app.psgi
ForceEnv modifies the environment passed to the application by adding your specified key value pairs.
This is primarily useful when testing apps under plackup (or similar) in a development environment.
Thomas Sibley <tsibley@cpan.org>
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
To install Plack::Middleware::ForceEnv, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::ForceEnv
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::ForceEnv
For more information on module installation, please visit the detailed CPAN module installation guide.