G'day,
I am working with DBIx :: Class 0.07003 and DBIx :: Class :: Schema :: Loader 0.03009, and I'm trying to change the base class of the classes generated by Loader - from:
package S2S::DBIxperiment::Productions; # Created by DBIx::Class::Schema::Loader v0.03009 @ 2011-06-24 14:29:13 use base 'DBIx::Class'; __PACKAGE__->load_components("PK::Auto", "Core");
to something like:
package S2S::DBIxperiment::Productions; # Created by DBIx::Class::Schema::Loader v0.03009 @ 2011-06-24 14:29:13 use base 'BaseMooseDBI'; __PACKAGE__->load_components("PK::Auto", "Core");
where BaseMooseDBI looks like this:
package BaseMooseDBI; use Moose; use base qw(DBIx::Class);
However, it does not seem to work at all, and it does not seem to inherit things from the BaseMooseDBI package (attributes, etc.). I tried to override load_components in BaseMooseDBI , but it never BaseMooseDBI called - instead, errors that it cannot find load_components ?
What is the problem?
Note. I cannot use the new use_moose and result_base_class when creating result classes.
EDITOR: Solution found. See how DBIx :: Class :: Schema :: Loader does it now, has the Mutable and Immutable classes.
source share