]> git.decadent.org.uk Git - maypole.git/blob - lib/Maypole/Config.pm
documentation fix for Maypole::Config
[maypole.git] / lib / Maypole / Config.pm
1 package Maypole::Config;
2 use base qw(Class::Accessor::Fast);
3 use attributes ();
4
5 use strict;
6 use warnings;
7
8 # Public accessors.
9 __PACKAGE__->mk_accessors(
10     qw( view uri_base template_root model loader display_tables ok_tables
11       rows_per_page dsn user pass opts application_name)
12 );
13
14 # Should only be modified by model.
15 __PACKAGE__->mk_ro_accessors(qw( classes tables table_to_class));
16
17 1;
18
19 =head1 NAME
20
21 Maypole::Config - Maypole Configuration Class
22
23 =head1 DESCRIPTION
24
25 This class stores all configuration data for your Maypole application.
26
27 =head1 METHODS
28
29 =head2 View related
30
31 =head3 application_name
32
33 This should be a string containing you applications name.
34
35 =head3 view
36
37 The view class for your Maypole Application. Defaults to "Maypole::View::TT"
38
39 =head3 uri_base 
40
41 This is the uri base that should be appended to your application when maypole 
42 makes urls.
43
44 =head3 tables
45
46 Contains a list of all tables, if supported by model.
47
48 =head3 table_to_class
49
50 A hash containing a table to class mapping, if supported by model.
51
52 =head3 template_root
53
54 This is where your application can find it's templates.
55
56 =head3 rows_per_page
57
58 This is the  number of rows your application should display per page.
59
60 =head2 Model-Related
61
62 =head3 display_tables 
63
64 These are the tables that are public to your maypole application
65
66 =head3 ok_tables
67
68 These are the tables that maypole should care about
69
70 =head3 model
71
72 The model class for your Maypole Application. Defaults to "Maypole::View::CDBI"
73
74 =head3 loader
75
76 This is the loader object. It's set up by the CDBI model if it's not initialized before setup.
77
78 =head3 classes
79
80 This config variable contains a list of your view classes. This set up by the
81 model class, and should not be changed in the view or the config.
82
83 =head3 dsn
84 The DSN to your database. Follows standard DBD syntax.
85
86 =head3 user
87
88 Username to log into the database with
89
90 =head3 pass
91
92 Password for database user.
93
94 =head3 opts
95
96 Other options to the dbi connect call.
97
98 =head1 SEE ALSO
99
100 L<Maypole>
101
102 =head1 MAINTAINER
103
104 Sebastian Riedel, c<sri@oook.de>
105
106 =head1 AUTHOR
107
108 Simon Cozens, C<simon@cpan.org>
109
110 =head1 LICENSE
111
112 You may distribute this code under the same terms as Perl itself.
113
114 =cut
115