Revision history for Perl extension Maypole
+2.05 Tue Oct 28 20:00:00 2004
+ - Fixed a bug in CGI::Maypole::parse_location() (Dave Howorth)
+ - Some fixes for Maypole::Config, Maypole::Model::Base and
+ Maypole::Model::CDBI::Plain (Dave Howorth)
+
2.04 Tue Oct 27 14:00:00 2004
- Fixed Apache::MVC version (Randal Schwartz)
- fixed template_args (Dave Howorth)
use strict;
use warnings;
-our $VERSION = '2.04';
+our $VERSION = '2.05';
sub run {
my $self = shift;
my $loc = $self->{cgi}->url( -absolute => 1 );
no warnings 'uninitialized';
$self->{path} =~ s/^($loc)?\///;
+ $self->{path} .= '/' if $self->{path} eq $loc;
$self->parse_path;
$self->parse_args;
}
);
# Should only be modified by model.
-__PACKAGE__->mk_ro_accessors(qw( classes tables table_to_class));
+__PACKAGE__->mk_ro_accessors(qw( classes tables));
1;
Contains a list of all tables, if supported by model.
-=head3 table_to_class
-
-A hash containing a table to class mapping, if supported by model.
-
=head3 template_root
This is where your application can find its templates.
=head3 display_tables
-These are the tables that are public to your Maypole application.
-Defaults to all the tables in the database.
+This is a list of the tables that are public to your Maypole
+application. Defaults to all the tables in the database.
=head3 dsn
=head3 ok_tables
-These are the tables that Maypole should care about
+This is a hash of the public tables. It is populated automatically by
+Maypole from the list in display_tables and should not be changed.
=head3 pass
Username to log into the database with.
+=head2 Adding additional configuration data
+
+If your modules need to store additional configuration data for their
+own use or to make available to templates, add a line like this to your
+module:
+
+ Maypole::Config->mk_accessors(qw(variable or variables));
+
+Care is needed to avoid conflicting variable names.
+
=head1 SEE ALSO
L<Maypole>
package Maypole::Model::CDBI::Plain;
use base 'Maypole::Model::CDBI';
+Maypole::Config->mk_accessors(qw(table_to_class));
+
sub setup_database {
my ( $self, $config, $namespace, $classes ) = @_;
$config->{classes} = $classes;