I've also multiple apps/scripts which use the same tables. I've a module named NAC::Model::DBIC which includes the Table and ResultSet classes which are shared between them (e.g. NAC::Model::DBIC::Table::XXX and NAC::Model::DBIC::ResultSet::XXX).
The schema files are per catalyst app + one in the model module which load all of them. One looks like that: package NAC::Web::NAC::Schema::NAC; use base qw/DBIx::Class::Schema/; # load subclassed tables __PACKAGE__->load_classes(qw/ Table5 /); # load additional classes from NAC::Model::DBIC __PACKAGE__->load_classes({ 'NAC::Model::DBIC::Table' => [qw/ Table1 Table2 /]} ); 1; Regards, Alex -----Original Message----- From: Hu Hailin [mailto:i...@h2l.name] Sent: Tuesday, January 06, 2009 10:58 AM To: DBIx::Class user and developer list Subject: Re: [Dbix-class] Same table set, multiple schema problem ahrrrr, i can load a different set of tables before connecting. thank you, Moritz. On Tue, Jan 6, 2009 at 6:16 PM, Moritz Onken <on...@houseofdesign.de> wrote: > > Am 06.01.2009 um 08:30 schrieb Hu Hailin: > >> 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 >> ... >> ---------- > > > Have a look at > http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Schema.pm#load_classes > where you can set specific classes to be loaded. > > moritz > > _______________________________________________ > List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > IRC: irc.perl.org#dbix-class > SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ > Searchable Archive: > http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk > -- islue _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien Handelsgericht Wien, FN 79340b *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* Notice: This e-mail contains information that is confidential and may be privileged. If you are not the intended recipient, please notify the sender and then delete this e-mail immediately. *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk