1 Aug 2004 16:27
multiple Maypole applications
David R. Baird <dave <at> riverside-cms.co.uk>
2004-08-01 14:27:10 GMT
2004-08-01 14:27:10 GMT
Hi,
Maypole has been on my list of things to investigate for a while. I
finally got the chance over the weekend, wish I'd made the time
before. It does exactly what it says on the box - applications up and
running in minutes. Fantastic!
So I tried adding a second Maypole application to my site, after
getting the BeerDB thing up and running, but the config of the second
application overwrites the first. The patch below fixes that, and
everything seems to work fine.
--- /.cpan/build/Maypole-1.7/blib/lib/Maypole.pm Sat Jul 17 20:15:20
2004
+++ Maypole.pm Sun Aug 1 10:26:21 2004
<at> <at> -22,7 +22,8 <at> <at>
# Naughty.
*{$calling_class."::handler"} = sub {
Maypole::handler($calling_class, <at> _) };
}
- my $config = $calling_class->config;
+ my $config = {};
+ $calling_class->config($config);
$config->{model} ||= "Maypole::Model::CDBI";
$config->{model}->require;
die "Couldn't load the model class $config->{model}: $ <at> " if $ <at> ;
--
--
Dr. David R. Baird
(Continue reading)
- Larry Wall
RSS Feed