1Plack::Middleware::ForcUesEenrv(C3o)ntributed Perl DocumPelnatcakt:i:oMniddleware::ForceEnv(3)
2
3
4
6 Plack::Middleware::ForceEnv - Force set environment variables for
7 testing
8
10 # in app.psgi
11 use Plack::Builder;
12
13 builder {
14 enable 'ForceEnv' =>
15 REMOTE_ADDR => "127.0.0.1",
16 REMOTE_USER => "trs";
17 $app;
18 };
19
20 # with plackup
21 plackup -e 'enable ForceEnv => REMOTE_USER => "trs"' app.psgi
22
24 ForceEnv modifies the environment passed to the application by adding
25 your specified key value pairs.
26
27 This is primarily useful when testing apps under plackup (or similar)
28 in a development environment.
29
31 Thomas Sibley <tsibley@cpan.org>
32
34 This library is free software; you may redistribute it and/or modify it
35 under the same terms as Perl itself.
36
37
38
39perl v5.32.0 2020-07-28 Plack::Middleware::ForceEnv(3)