Plack::Middleware::SimpleContentFilter(3pm)

Plack::Middleware::SimpleContentFilter3pm

Filters response content

Usage

  use Plack::Builder;
  my $app = sub {
      return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
  };
  builder {
      enable "Plack::Middleware::SimpleContentFilter",
          filter => sub { s/Foo/Bar/g; };
      $app;
  };

Overview

This middleware should be considered as a demo. Running this against your application might break your HTML unless you code the filter callback carefully.

Plack::Middleware::SimpleContentFilter is a simple content text filter to run against response body. This middleware is only enabled against responses with "text/*" Content-Type.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Author

Tatsuhiko Miyagawa

From libplack-perl 1.0051-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.