[Maypole] Maypole model inheritance
Dave Howorth
dhoworth@mrc-lmb.cam.ac.uk
Fri, 10 Dec 2004 17:37:08 +0000
OK, so here's what I now see with regard to this order of inheritance
question:
First, in the loader, it's not pushing as I stated, it's a simple
assignment:
@{"$class\::ISA"} = qw(Class::DBI::mysql);
Then later in Maypole::setup it does this:
unshift @{ $subclass . "::ISA" }, $config->model;
and subclass inherits from Maypole::Model::CDBI which inherits from
Class::DBI
So that's why Class::DBI::mysql ends up behind Class::DBI in the
inheritance and in consequence the wrong version of column_type gets called.
But using unshift is pretty unusual, so there's probably a good reason
for it :) Before I waste more time digging into it, do any of the gurus
have any thoughts on this?
Cheers, Dave