1Maypole::Config(3)    User Contributed Perl Documentation   Maypole::Config(3)
2
3
4

NAME

6       Maypole::Config - Maypole Configuration Class
7

DESCRIPTION

9       This class stores all configuration data for your Maypole application.
10

METHODS

12   View related
13       application_name
14
15       This should be a string containing your application's name.
16
17       Optional. Is used in the factory templates.
18
19       rows_per_page
20
21       This is the number of rows your application should display per page.
22
23       Optional.
24
25       tables
26
27       Contains a list of all tables, if supported by model.
28
29       template_extension
30
31       Optional template file extension.
32
33       template_root
34
35       This is where your application can find its templates.
36
37       uri_base
38
39       This is the URI base that should be prepended to your application when
40       Maypole makes URLs.
41
42       view
43
44       The name of the view class for your Maypole Application. Defaults to
45       "Maypole::View::TT".
46
47       build_form_elements
48
49       Globally specify whether to build form elements; populating the cgi
50       metadata with autogenerated HTML::Element widgets for the class/object.
51
52       Can be over-ridden per action using the method of the same name for the
53       request.
54
55       If not set, then Maypole will assume it is true.
56
57       view_options
58
59       A hash of configuration options for the view class. Consult the
60       documentation for your chosen view class for information on available
61       configuration options.
62
63   Model-Related
64       classes
65
66       This config variable contains a list of your view classes. This is set
67       up by the model class, and should not be changed in the view or the
68       config.
69
70       display_tables
71
72       This is a list of the tables that are public to your Maypole
73       application. Defaults to all the tables in the database.
74
75       dsn
76
77       The DSN to your database. Follows standard DBD syntax.
78
79       loader
80
81       This is the loader object (n.b. an instance, not a class name). It's
82       set up by the CDBI model to an instance of "Class::DBI::Loader" if it's
83       not initialized before calling setup().
84
85       model
86
87       The name of the model class for your Maypole Application. Defaults to
88       "Maypole::Model::CDBI".
89
90       ok_tables
91
92       This is a hash of the public tables. It is populated automatically by
93       Maypole from the list in display_tables and should not be changed.
94
95       pass
96
97       Password for database user.
98
99       opts
100
101       Other options to the DBI connect call.
102
103       user
104
105       Username to log into the database with.
106
107       build_form_elements
108
109       Flag specifying whether to build metadata for form elements in factory
110       templates
111
112       request_options
113
114       Hashref of options passed when creating cgi or apache request
115
116   Adding additional configuration data
117       You can use the 'additional' attribute for stashing additional info,
118       especially from additional_data method, i.e.
119       $r->config->additional({foo=>bar});
120
121       Or..
122
123       If your modules need to store additional configuration data for their
124       own use or to make available to templates, add a line like this to your
125       module:
126
127          Maypole::Config->mk_accessors(qw(variable or variables));
128
129       Care is needed to avoid conflicting variable names.
130

SEE ALSO

132       Maypole
133

AUTHOR

135       Sebastian Riedel, "sri@oook.de"
136

AUTHOR EMERITUS

138       Simon Cozens, "simon@cpan.org"
139

LICENSE

141       You may distribute this code under the same terms as Perl itself.
142
143
144
145perl v5.32.0                      2020-07-28                Maypole::Config(3)
Impressum