X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FMaypole%2FHTTPD%2FFrontend.pm;fp=lib%2FMaypole%2FHTTPD%2FFrontend.pm;h=bea8aa6f1b23c3d36e3c2afa80f760a11b34bcec;hp=0000000000000000000000000000000000000000;hb=fadcae3ffddebaa38da172f9624cc60176d80b33;hpb=d813b3413bbd58789200c2ef02c7386e33cabe00 diff --git a/lib/Maypole/HTTPD/Frontend.pm b/lib/Maypole/HTTPD/Frontend.pm new file mode 100644 index 0000000..bea8aa6 --- /dev/null +++ b/lib/Maypole/HTTPD/Frontend.pm @@ -0,0 +1,50 @@ +package Maypole::HTTPD::Frontend; +use strict; +use warnings; + +use CGI::Maypole 2.11; # 2.11 has collect_output() + +use base 'CGI::Maypole'; + +sub get_request { shift->cgi(CGI->new) } + +{ + my $output; + sub send_output { $output = shift->collect_output } + sub output_now { print $output; undef $output } +} + +1; + +=head1 NAME + +Maypole::HTTPD::Frontend - Maypole driver class for Maypole::HTTPD + +=head1 DESCRIPTION + +This is a simple CGI based Maypole driver for L. It's used +automatically as the frontend by L. + +It overrides the following functions in L: + +=over 4 + +=item get_request + +Instantiates a L object representing the request. + +=item send_output + +Stores generated output in a buffer. + +=back + +=head2 output_now + +Actually output what's been buffered by send_output. Used by L + +=head1 SEE ALSO + +L, L + +=cut