]> git.decadent.org.uk Git - maypole.git/blob - lib/Maypole/HTTPD/Frontend.pm
tested and it seems to work
[maypole.git] / lib / Maypole / HTTPD / Frontend.pm
1 package Maypole::HTTPD::Frontend;
2 use strict;
3 use warnings;
4
5 use CGI::Maypole 2.11; # 2.11 has collect_output()
6
7 use base 'CGI::Maypole';
8
9 sub get_request { shift->cgi(CGI->new) }
10
11
12     my $output;
13     sub send_output { $output = shift->collect_output }
14     sub output_now  { print $output; undef $output }
15 }
16
17 1;
18
19 =head1 NAME
20
21 Maypole::HTTPD::Frontend - Maypole driver class for Maypole::HTTPD
22
23 =head1 DESCRIPTION
24
25 This is a simple CGI based Maypole driver for L<Maypole::HTTPD>. It's used 
26 automatically as the frontend by L<Maypole::Application>.
27
28 It overrides the following functions in L<CGI::Maypole>:
29
30 =over 4
31
32 =item get_request
33
34 Instantiates a L<CGI> object representing the request.
35
36 =item send_output
37
38 Stores generated output in a buffer.
39
40 =back
41
42 =head2 output_now
43
44 Actually output what's been buffered by send_output. Used by L<Maypole::HTTPD>
45
46 =head1 SEE ALSO
47
48 L<Maypole>, L<Maypole::HTTPD>
49
50 =cut