Apache::MVC(3)
π Apache::MVC π
okay bestie, welcome to Apache::MVC β she's the Apache front-end to Maypole, and she's that girl. β¨
πΈ NAME πΈ
Apache::MVC β literally just: Apache front-end to Maypole. no cap. π
π¦ SYNOPSIS π¦
package BeerDB;
use Maypole::Application;
that's it. that's the whole vibe. π
β¨ DESCRIPTION β¨
so like, Apache::MVC is a mod_perl platform driver for Maypole. π§
your app can inherit from Apache::MVC directly if you're feeling feral, but fr fr the recommended move is to use Maypole::Application instead. trust. π«Ά
π οΈ INSTALLATION π οΈ
step one, bestie: create a driver module exactly like the one illustrated in Maypole::Application. slay.
step two, put this in your Apache config:
<Location /beer>
SetHandler perl-script
PerlHandler BeerDB
</Location>
step three: copy the templates found in templates/factory into the beer/factory directory off the web root. π
when the designers finally get back to you with custom templates (they will take forever, it's giving group project energy π), those go in beer/custom.
and if you need to override templates on a database-table-by-table basis? put the new template in beer/table. iconic. π
this automatically gives you the add, edit, list, view and delete commands β for instance, to see a list of breweries, go to:
http://your.site/beer/brewery/list
for more information about how the system works and how to extend it, see Maypole. π
π Implementation π
this class overrides a whole set of methods in the base Maypole class to provide its functionality. see Maypole for these:
get_requestwarnparse_locationparse_argsredirect_requestβ sets output headers to redirect based on the arguments provided.
accepts either a single argument of the full url to redirect to, or a hash of named parameters:
$r->redirect_request('http://www.example.com/path');
or
$r->redirect_request(protocol=>'https', domain=>'www.example.com',
path=>'/path/file?arguments', status=>'302', url=>'..');
the named parameters are protocol, domain, path, status and url.
only 1 named parameter is required, but other than url, they can be combined as required and current values (from the request) will be used in place of any missing arguments. π«Ά the url argument must be a full url including protocol, and can only be combined with status.
get_protocolsend_outputget_template_root
π AUTHOR π
Simon Cozens, "simon@cpan.org" β legend behaviour, honestly. π
π CREDITS π
Aaron Trevena, Marcus Ramberg "marcus@thefeed.no", Sebastian Riedel "sri@oook.de" β the whole squad ate, no crumbs left. π₯
π LICENSE π
you may distribute this code under the same terms as Perl itself. periodt. π
and that's the whole page, bestie!! this one's from perl v5.42.0, dated 2025-07-25, and it's filed under Apache::MVC(3) in the User Contributed Perl Documentation β mwah, go forth and slay your Maypole app π¦β¨π
π¦ where this page comes from
- fedora 43: perl-Maypole 1:2.13-46.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms