1Plack::Middleware::SimpUlseeCronCtoennttrFiiblutteerdP(l3Pa)ecrkl::DMoicdudmleenwtaartei:o:nSimpleContentFilter(3)
2
3
4
6 Plack::Middleware::SimpleContentFilter - Filters response content
7
9 use Plack::Builder;
10
11 my $app = sub {
12 return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
13 };
14
15 builder {
16 enable "Plack::Middleware::SimpleContentFilter",
17 filter => sub { s/Foo/Bar/g; };
18 $app;
19 };
20
22 This middleware should be considered as a demo. Running this against
23 your application might break your HTML unless you code the filter
24 callback carefully.
25
26 Plack::Middleware::SimpleContentFilter is a simple content text filter
27 to run against response body. This middleware is only enabled against
28 responses with "text/*" Content-Type.
29
31 Tatsuhiko Miyagawa
32
33
34
35perl v5.32.0 2020P-l1a2c-k0:2:Middleware::SimpleContentFilter(3)