CGI::Maypole(3)

πŸ“¦
version 2.13 Β· 2 versions
, in fedora 43

πŸ’– CGI::Maypole πŸ’–

okay bestie, gather round, because this is the CGI-based front-end to Maypole and she is serving. This page lives in the User Contributed Perl Documentation section of the manual, and the module is CGI::Maypole, no cap. πŸŽ€


✨ NAME ✨

CGI::Maypole β€” a CGI-based front-end to Maypole. it's giving "let my Maypole app run inside a plain old CGI script" and honestly? iconic. πŸ‘‘


🌸 SYNOPSIS 🌸

package BeerDB;
use Maypole::Application;

## example beer.cgi:

#!/usr/bin/perl -w
use strict;
use BeerDB;
BeerDB->run();

so now, to go touch the beer database with your own two hands, you type this URL into your browser:

http://your.site/cgi-bin/beer.cgi/frontpage
NOTE: this Maypole frontend needs extra modules that are not gonna be installed or included with Maypole itself. pls read below, i'm begging. πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

This is a CGI platform driver for Maypole, periodt. Your application can inherit from CGI::Maypole directly, but bestie, the recommendation is that you use Maypole::Application instead. trust. ✨

This module requires CGI::Simple, and you're gonna have to install that yourself β€” via CPAN or manually, your call, but it's on you. πŸ’…


πŸŽ€ METHODS πŸŽ€

  • run β€” call this from your CGI script to start up the Maypole application. that's it, that's the whole vibe. πŸš€

Implementation πŸ’€

This class overrides a whole set of methods in the base Maypole class to provide its functionality. go peek at Maypole for these ones:

  • get_request
  • parse_location
  • warn
  • parse_args
  • redirect_request
  • get_protocol
  • send_output β€” generates output (using collect_output) and prints it.
  • collect_output β€” gathers headers and output together into a single string and returns it.
    • splitting this code out of send_output is what supports Maypole::HTTPD::Frontend.
  • get_template_root

🌈 DEPENDANCIES 🌈

  • CGI::Simple

(yes, that's the section name, i'm not fixing it, it's part of the lore. πŸ’€)


πŸ‘‘ AUTHORS πŸ‘‘

  • Dave Ranney dave@sialia.com
  • Simon Cozens simon@cpan.org

and that's the whole page, bestie!! 🫢 this one's from perl v5.42.0, dated 2025-07-25 β€” so go forth, run your CGI, and slay. mwah. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from