HTML::Mason::PSGIHandler(3pm)

HTML::Mason::PSGIHandler3pm

Psgi handler for html::mason

Usage

  # app.psgi
  use HTML::Mason::PSGIHandler;
  my $h = HTML::Mason::PSGIHandler->new(
      comp_root => "/path/to/doc_root", # required
  );
  my $handler = sub {
      my $env = shift;
      $h->handle_psgi($env);
  };

Overview

HTML::Mason::PSGIHandler is a PSGI handler for HTML::Mason. It's based on HTML::Mason::CGIHandler and allows you to process Mason templates on any web servers that support PSGI.

Methods

as_psgi

This method returns a subroutine to be used as a PSGI application.

In other words, these are equivalent:

  my $app = sub {
    my $env = shift;
    $h->handle_psgi($env);
  };
  my $app = $h->as_psgi;

new_psgi

  mount '/foo' => HTML::Mason::PSGIHandler->new_psgi( ... );

This method combines "new" and "as_psgi" to immediately return a subroutine that can be used as a PSGI application. It's useful for using inline with Plack::Builder.

Support

•

Git Repository

The latest code is available from the git repository at <http://github.com/abh/HTML-Mason-PSGIHandler>.

To send patches, make a fork on github and send a pull request.

•

Bugs

Please report bugs at <http://github.com/abh/HTML-Mason-PSGIHandler/issues>.

Releases

7 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8–9
  3. 10–13

Authors

Ask Bjørn Hansen <[email protected]>, Ricardo Signes <[email protected]>, Tatsuhiko Miyagawa <[email protected]>, Ruslan Zakirov <[email protected]>.

License

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

From libhtml-mason-psgihandler-perl 0.53-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.