.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "HTML::Mason::PSGIHandler 3pm" .TH HTML::Mason::PSGIHandler 3pm "2018-04-02" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HTML::Mason::PSGIHandler \- PSGI handler for HTML::Mason .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # 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); \& }; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" HTML::Mason::PSGIHandler is a \s-1PSGI\s0 handler for HTML::Mason. It's based on HTML::Mason::CGIHandler and allows you to process Mason templates on any web servers that support \s-1PSGI.\s0 .SH "METHODS" .IX Header "METHODS" .SH "as_psgi" .IX Header "as_psgi" This method returns a subroutine to be used as a \s-1PSGI\s0 application. .PP In other words, these are equivalent: .PP .Vb 4 \& my $app = sub { \& my $env = shift; \& $h\->handle_psgi($env); \& }; \& \& my $app = $h\->as_psgi; .Ve .SS "new_psgi" .IX Subsection "new_psgi" .Vb 1 \& mount \*(Aq/foo\*(Aq => HTML::Mason::PSGIHandler\->new_psgi( ... ); .Ve .PP This method combines \f(CW\*(C`new\*(C'\fR and \f(CW\*(C`as_psgi\*(C'\fR to immediately return a subroutine that can be used as a \s-1PSGI\s0 application. It's useful for using inline with Plack::Builder. .SH "SUPPORT" .IX Header "SUPPORT" .IP "\(bu" 4 Git Repository .Sp The latest code is available from the git repository at . .Sp To send patches, make a fork on github and send a pull request. .IP "\(bu" 4 Bugs .Sp Please report bugs at . .SH "AUTHORS" .IX Header "AUTHORS" Ask Bjørn Hansen , Ricardo Signes , Tatsuhiko Miyagawa , Ruslan Zakirov . .SH "LICENSE" .IX Header "LICENSE" This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1CGI::PSGI\s0 Plack \s-1PSGI\s0 HTML::Mason::CGIHandler