9e9a6561eafcd4a7698d8a808be8c853f79c1455
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / MyFilm.pm
1 package # hide from PAUSE
2     MyFilm;
3
4 use base 'MyBase';
5 use MyStarLink;
6
7 use strict;
8
9 __PACKAGE__->set_table();
10 __PACKAGE__->columns(All => qw/filmid title/);
11 __PACKAGE__->has_many(_stars => 'MyStarLink');
12 __PACKAGE__->columns(Stringify => 'title');
13
14 sub _carp { }
15
16 sub stars { map $_->star, shift->_stars }
17
18 sub create_sql {
19   return qq{
20     filmid  TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
21     title   VARCHAR(255)
22   };
23 }
24
25 1;
26