HTML::...andler(3pm)
π HTML::Mason::PSGIHandler β the manual, but make it cute π
okay bestie, pull up a chair, we're reading the docs for HTML::Mason::PSGIHandler, a User Contributed Perl Documentation page, and honestly? it's giving "small module, big slay". π
β¨ NAME β¨
HTML::Mason::PSGIHandler β a PSGI handler for HTML::Mason. that's it, that's the name, she's concise π¦
πΈ SYNOPSIS πΈ
here's the whole vibe in one app.psgi, no cap:
# 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);
};
yes the comp_root is required, she's not optional, don't try it π
π DESCRIPTION π
So. HTML::Mason::PSGIHandler is a PSGI handler for HTML::Mason. It's built on top of HTML::Mason::CGIHandler, and what that means for you is: you can process Mason templates on any web server that supports PSGI. any of them. all of them. go off. π₯
π METHODS π
β as_psgi
This method returns a subroutine you can use as a PSGI application. iconic behavior, honestly
In other words β and this is the part that matters β these two are equivalent:
my $app = sub {
my $env = shift;
$h->handle_psgi($env);
};
my $app = $h->as_psgi;
same energy. literally the same thing. pick your fighter. π«Ά
π¦ new_psgi
mount '/foo' => HTML::Mason::PSGIHandler->new_psgi( ... );
This one combines new and as_psgi so it immediately hands you back a subroutine that works as a PSGI application. It's the move when you want to use it inline with Plack::Builder. π§
π SUPPORT π
- Git Repository β the freshest code lives in the git repository at <http://github.com/abh/HTML-Mason-PSGIHandler>.
- Wanna send patches? Fork it on github and send a pull request. we love a contributor moment β¨
- Bugs β please report bugs at <http://github.com/abh/HTML-Mason-PSGIHandler/issues>.
fr fr, report them there, don't just suffer in silence π
π AUTHORS π
the whole squad, give it up: Ask BjΓΈrn Hansen <miyagawa@bulknews.net>, Ricardo Signes <rjbs@cpan.org>, Tatsuhiko Miyagawa <miyagawa@bulknews.net>, Ruslan Zakirov <ruz@bestpractical.com>. π
π LICENSE π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so generous, so legal, so correct π
π SEE ALSO π
CGI::PSGI Plack PSGI HTML::Mason::CGIHandler
go read those too, iykyk π
and that's the whole page, bestie!! this version was perl v5.26.1, dated 2018-04-02, and it's HTML::...andler(3pm) signing off. stay hydrated, keep your comp_root valid, mwah π
β¨
π¦ where this page comes from
- debian bookworm: libhtml-mason-psgihandler-perl 0.53-2
- debian trixie: libhtml-mason-psgihandler-perl 0.53-2
- ubuntu jammy: libhtml-mason-psgihandler-perl 0.53-2
- ubuntu noble: libhtml-mason-psgihandler-perl 0.53-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms