[Maypole] Problems using an alternative CDBI model

Matt Adams matt.adams@morcor.com
Wed, 20 Oct 2004 13:24:26 -0400


Hello folks:

I'm writing a Maypole-powered app that uses a custom CDBI model and a custom TT 
view back end.

I've recently upgraded to Maypole from the SVN repository and am now using the 
nice modules from the Maypole::Plugin name space.

Problem is, code that once worked doesn't anymore.  Specifically, I can't seem 
to override the default CDBI model of Maypole::Model::CDBI, even though I 
specify a different model prior to calling Maypole->setup(...).  I've included 
an excerpt of my code below.

Any thoughts or ideas why this might be?


Thanks in advance,

Matt

========= BEGIN CODE =========

package MyApp;
use MyApp::Constants;
$ENV{MAYPOLE_CONFIG} = BINPATH . '/MyApp.yaml';

use Maypole::Application qw(-Debug Config::YAML Authentication::Abstract);
use Maypole::Constants;

MyApp->config->{model} = "MyApp::Model::CDBI";
MyApp->setup(
	MyApp->config->{dsn},
	MyApp->config->{user},
	MyApp->config->{pass}
);
MyApp->config->{view} = "MyApp::View::TT";
MyApp->config->{display_tables} = qw[[this that me]];

========== END CODE ==========

-- 
Matt Adams <matt.adams@morcor.com>
Development Specialist
Morcor Solutions Inc. <http://www.morcor.com/>
(613) 354-2912 x228

GnuPG public key at <http://staff.morcor.com/~madams/>
Key fingerprint: BED5 B4F7 CCF5 D7B5 7C56  0505 9A0A A0FB C937 5975