[Dbix-class] Same table set, multiple schema problem
Hu Hailin
i at h2l.name
Tue Jan 6 07:30:12 GMT 2009
Hi
Our application is using Catalyst and DBIx::Class. We have about 100
tables, so we have about 100 DBIC pm files. Just like
----------
Schema.pm
Schema/Table1.pm
Schema/Table2.pm
...
----------
Loading many table classes seems to be a little bit heavy. For some
purpose specified task(scripts out of persistent environment), only a
few of the tables are needed. I think loading less tables could make
it a little faster. What I can figure out is to create another suite
of schema and table classes.
----------
Schema2.pm (Only loads Table1 and Table2)
Schema2/Table1.pm (Yes, copied)
Schema2/Table2.pm (Yes, copied)
----------
However, files copy makes me feel not good. Is there any best practice
for such a situation?
Also, there are custom methods in table classes, I'm afraid
DBIx::Class::Schema::Loader can't help.
--
islue
More information about the DBIx-Class
mailing list