diff options
Diffstat (limited to 'examples/mwrap.psgi')
-rw-r--r-- | examples/mwrap.psgi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/mwrap.psgi b/examples/mwrap.psgi new file mode 100644 index 0000000..b4fcafb --- /dev/null +++ b/examples/mwrap.psgi @@ -0,0 +1,14 @@ +# Copyright (C) all contributors <mwrap-perl@80x24.org> +# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt> +# A startup command for development: +# plackup -I ./blib/lib -I ./blib/arch -o 127.0.0.1 examples/mwrap.psgi +use v5.12; +use Devel::Mwrap::PSGI; +use Plack::Builder; +my $mw = Devel::Mwrap::PSGI->new; +delete $ENV{LD_PRELOAD}; # don't impose in subprocesses + +builder { + enable 'Head'; + sub { $mw->call($_[0]) }; +} |