Cataly...Apache(3pm)
β¨ Cataly...Apache (3pm) β¨
okay so bestie, welcome to the Catalyst::Engine::Apache page β that's a Perl module doc, 3pm section, and we're about to make Apache play nice with Catalyst π
π NAME π
Catalyst::Engine::Apache β literally just the Catalyst Apache Engines. that's it, that's the name, no cap.
πΈ SYNOPSIS πΈ
okay so for actual example Apache configs, go read the docs for whichever engine matches your Apache version, mkay? here's the lineup:
Catalyst::Engine::Apache::MP13β mod_perl 1.3x, the vintage one π«ΆCatalyst::Engine::Apache2::MP19β mod_perl 1.99xCatalyst::Engine::Apache2::MP20β mod_perl 2.x, the modern girlie β¨
π¦ DESCRIPTION π¦
these classes hand you mod_perl support for Catalyst. that's the whole vibe. slay.
π METHODS π
$c->engine->apache
returns an Apache, Apache::RequestRec or Apache2::RequestRec object, and which one you get totally depends on your mod_perl version. also!! this method is available as $c->apache too, so you can be lazy about it π
$c->engine->return
so if you need to return something that is not OK from the mod_perl handler, you can set any other Apache constant in this method. but bestie, listen to me:
only use this if you genuinely know what you're doing, or bad things may happen! π not a drill.
like, for example, to return DECLINED in mod_perl 2:
use Apache2::Const -compile => qw(DECLINED);
$c->engine->return( Apache2::Const::DECLINED );
π NOTES ABOUT LOCATIONMATCH π
the Apache engine will try to figure out the correct base path if your app is running inside a LocationMatch block. like, for example:
<LocationMatch ^/match/(this|that)*>
SetHandler modperl
PerlResponseHandler MyApp
</LocationMatch>
this will correctly set the base path to '/match/this/' or '/match/that/', depending on which path was actually used for the request. iconic behaviour, honestly π
but sometimes that's not what you want, and that's valid. so you can disable this behavior by adding this to your configuration:
PerlSetVar CatalystDisableLocationMatch 1
NOTES ON NON-STANDARD PORTS
if you wanna run your site on a non-standard port you'll need to use the Port Apache config rather than Listen. do that and the correct port gets added to urls created using uri_for. π
Port 8080
π OVERLOADED METHODS π
this class overloads some methods from Catalyst::Engine. look at her go:
prepare_request($r)prepare_connectionprepare_query_parametersprepare_headersprepare_pathread_chunkfinalize_bodyfinalize_headerswrite
π SEE ALSO π
Catalyst Catalyst::Engine. that's the duo, iykyk π
π AUTHORS π
the literal legends who made this:
- Sebastian Riedel <sri@cpan.org>
- Christian Hansen <ch@ngmedia.com>
- Andy Grundman <andy@hybridized.org>
- Tomas Doran <bobtfish@bobtfish.net>
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2010 by The AUTHORS.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. π
and that's the whole page bestie π«Ά this was perl v5.36.0, dated 2022-12-06 β go forth and configure your Apache, you got this πβ¨
π¦ where this page comes from
- debian bookworm: libcatalyst-engine-apache-perl 1.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-engine-apache-perl 1.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-engine-apache-perl 1.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-engine-apache-perl 1.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-engine-apache-perl 1.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms