1package MyStar; 2 3BEGIN { unshift @INC, './t/testlib'; } 4use base 'MyBase'; 5 6use strict; 7 8__PACKAGE__->set_table(); 9__PACKAGE__->columns(All => qw/starid name/); 10__PACKAGE__->has_many(films => [ MyStarLink => 'film' ]); 11 12# sub films { map $_->film, shift->_films } 13 14sub create_sql { 15 return qq{ 16 starid TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY, 17 name VARCHAR(255) 18 }; 19} 20 211; 22 23