1Apache::MVC(3) User Contributed Perl Documentation Apache::MVC(3)
2
3
4
6 Apache::MVC - Apache front-end to Maypole
7
9 package BeerDB;
10 use Maypole::Application;
11
13 A mod_perl platform driver for Maypole. Your application can inherit
14 from Apache::MVC directly, but it is recommended that you use
15 Maypole::Application.
16
18 Create a driver module like the one illustrated in
19 Maypole::Application.
20
21 Put the following in your Apache config:
22
23 <Location /beer>
24 SetHandler perl-script
25 PerlHandler BeerDB
26 </Location>
27
28 Copy the templates found in templates/factory into the beer/factory
29 directory off the web root. When the designers get back to you with
30 custom templates, they are to go in beer/custom. If you need to
31 override templates on a database-table-by-table basis, put the new
32 template in beer/table.
33
34 This will automatically give you "add", "edit", "list", "view" and
35 "delete" commands; for instance, to see a list of breweries, go to
36
37 http://your.site/beer/brewery/list
38
39 For more information about how the system works and how to extend it,
40 see Maypole.
41
43 This class overrides a set of methods in the base Maypole class to
44 provide its functionality. See Maypole for these:
45
46 get_request
47 warn
48 parse_location
49 parse_args
50 redirect_request
51 Sets output headers to redirect based on the arguments provided
52
53 Accepts either a single argument of the full url to redirect to, or
54 a hash of named parameters :
55
56 $r->redirect_request('http://www.example.com/path');
57
58 or
59
60 $r->redirect_request(protocol=>'https', domain=>'www.example.com',
61 path=>'/path/file?arguments', status=>'302', url=>'..');
62
63 The named parameters are protocol, domain, path, status and url
64
65 Only 1 named parameter is required but other than url, they can be
66 combined as required and current values (from the request) will be
67 used in place of any missing arguments. The url argument must be a
68 full url including protocol and can only be combined with status.
69
70 get_protocol
71 send_output
72 get_template_root
73
75 Simon Cozens, "simon@cpan.org"
76
78 Aaron Trevena Marcus Ramberg, "marcus@thefeed.no" Sebastian Riedel,
79 "sri@oook.de"
80
82 You may distribute this code under the same terms as Perl itself.
83
84
85
86perl v5.32.0 2020-07-28 Apache::MVC(3)