I've come across something... well ... odd
In a maypole application I have a package, AMS::SysConfig. This is
derived from another Class::DBI based packge, Corbas::MVC::Sysconfig.
In a test script in the shell this works perfectly.
Under Maypole, it barfs in a big way complaining that the primary
keys haven't been defined.
Anyway, this seemed rather odd to me so I went to have a look.
Running Apache using Apache::DB I traced through the package load.
Now, I have my own version of setup_database in my model package. It
just requires the various database classes used in the app, that's
all. It uses UNIVERSAL::require.
At the point at which the package has been loaded
AMS::SysConfig->primary_columns
returns exacatly as I would expect.
Going back into Maypole->setup we hit the loop where the Model class
is unshifted onto the @ISA array for each class.
At that point
AMS::SysConfig->primary_columns
returns an empty list
My own model class is a variant of Maypole::Model::CDBI::Plain
(variant in that I use a separate mechanism for connecting to the
database that delays connection until needed - it won't affect this
code). So, my model is derived from Maypole::Model:CDBI in much the
same way as normal.
Having said all that, has anyone seen similar or have a clue why this
happening? I have my suspicions that it's related to the @ISA
structure that starts out as:
@AMS::SysConfig::ISA = ('Corbas::MVC::SysConfig')
where
@Corbas::MVC::SysConfig::ISA = ('Corbas:MVC::Base')
@Corbas::MVC::Base::ISA = ('Corbas::Data::Base',
'Maypole::Model::Base')
@Corbas::Data::Base::ISA = ('Class::DBI')
Then gets changed to:
@AMS::SysConfig::ISA = ('Corbas::MVC::Model', 'Corbas::MVC::SysConfig')
where
@Corbas::MVC::Model::ISA = ('Maypole::Model::CDBI')
@Maypole::Model::CDBI::ISA = ('Maypole::Model::Base', 'Class::DBI')
Anyone got a clue? My head hurts
nic
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users