1Maypole::Application(3)User Contributed Perl DocumentatioMnaypole::Application(3)
2
3
4

NAME

6       Maypole::Application - Universal Maypole Frontend
7

SYNOPSIS

9           use Maypole::Application;
10
11           use Maypole::Application qw(Config::YAML);
12
13           use Maypole::Application qw(-Debug Config::YAML -Setup);
14
15           use Maypole::Application qw(Config::YAML Loader -Setup -Debug);
16
17           use Maypole::Application qw(-Debug2 MasonX AutoUntaint);
18

DESCRIPTION

20       This is a universal frontend for mod_perl1, mod_perl2, HTML::Mason and
21       CGI.
22
23       Automatically determines the appropriate frontend for your environment
24       (unless you want to use MasonX::Maypole, in which case include "MasonX"
25       in the arguments).
26
27       Loads plugins supplied in the "use" statement.
28
29       Responds to flags supplied in the "use" statement.
30
31       Initializes the application's configuration object.
32
33       You can omit the Maypole::Plugin:: prefix from plugins. So
34       Maypole::Plugin::Config::YAML becomes Config::YAML.
35
36           use Maypole::Application qw(Config::YAML);
37
38       You can also set special flags like -Setup, -Debug and -Init.
39
40           use Maypole::Application qw(-Debug Config::YAML -Setup);
41
42       The position of plugins in the chain is important, because they are
43       loaded/executed in the same order they appear.
44

FRONTEND

46       Under mod_perl (1 or 2), selects Apache::MVC.
47
48       Otherwise, selects CGI::Maypole.
49
50       If "MasonX" is specified, sets MasonX::Maypole as the frontend. This
51       currently also requires a mod_perl environment.
52

FLAGS

54       -Setup
55               use Maypole::Application qw(-Setup);
56
57           is equivalent to
58
59               use Maypole::Application;
60               MyApp->setup;
61
62           Note that no options are passed to "setup()". You must ensure that
63           the required model config parameters are set in "MyApp->config".
64           See Maypole::Config for more information.
65
66       -Init
67               use Maypole::Application qw(-Setup -Init);
68
69           is equivalent to
70
71               use Maypole::Application;
72               MyApp->setup;
73               MyApp->init;
74
75           Note that the "-Setup" flag is required for the "-Init" flag to
76           work.
77
78           In persistent environments (e.g. "mod_perl"), it is useful to call
79           "init" once in the parent server, rather than at the beginning of
80           the first request to each child server, in order to share the view
81           code loaded during "init".  Note that you must supply all the
82           config data to your app before calling "setup" and "init", probably
83           by using one of the "Maypole::Plugin::Config::*" plugins.
84
85       -Debug
86               use Maypole::Application qw(-Debug);
87
88           is equivalent to
89
90               use Maypole::Application;
91               sub debug { 1 }
92
93           You can specify a higher debug level by saying "-Debug2" etc.
94

AUTHOR

96       Sebastian Riedel, "sri@oook.de" Idea by Marcus Ramberg,
97       "marcus@thefeed.no"
98

LICENSE

100       You may distribute this code under the same terms as Perl itself.
101
102
103
104perl v5.30.0                      2019-07-26           Maypole::Application(3)
Impressum