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