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