Just like you would do with every perl class.
You could define a base class and subclass from it or use Moose roles.
--
Best regards, Alex
Am Freitag, den 02.04.2010, 10:35 +0200 schrieb 刘强:
> package MyDB::Schema::Result::Artist;
> use base qw/DBIx::Class::Core/;
>
> __PACKAGE__->table('artist');
> __PACKAGE__->add_columns(qw/ artistid name /);
> __PACKAGE__->set_primary_key('artistid');
>
>
> for example we have talbes: artist1, artist2....artist10
> do we need to create 10 package?
> how to use one package,just change the table name dynamicly?
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
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/[email protected]