Commit | Line | Data |
8273e845 |
1 | package # hide from PAUSE |
c6d74d3e |
2 | Film; |
ea2e61bf |
3 | |
4a233f30 |
4 | use warnings; |
ea2e61bf |
5 | use strict; |
6 | |
4a233f30 |
7 | use base 'DBIC::Test::SQLite'; |
8 | |
ea2e61bf |
9 | __PACKAGE__->set_table('Movies'); |
10 | __PACKAGE__->columns('Primary', 'Title'); |
11 | __PACKAGE__->columns('Essential', qw( Title )); |
12 | __PACKAGE__->columns('Directors', qw( Director CoDirector )); |
13 | __PACKAGE__->columns('Other', qw( Rating NumExplodingSheep HasVomit )); |
14 | |
15 | sub create_sql { |
6a3bf251 |
16 | return qq{ |
17 | title VARCHAR(255), |
18 | director VARCHAR(80), |
19 | codirector VARCHAR(80), |
20 | rating CHAR(5), |
21 | numexplodingsheep INTEGER, |
22 | hasvomit CHAR(1) |
ea2e61bf |
23 | } |
24 | } |
25 | |
8273e845 |
26 | sub create_test_film { |
6a3bf251 |
27 | return shift->create({ |
28 | Title => 'Bad Taste', |
29 | Director => 'Peter Jackson', |
30 | Rating => 'R', |
31 | NumExplodingSheep => 1, |
32 | }); |
ea2e61bf |
33 | } |
34 | |
35 | package DeletingFilm; |
36 | |
37 | use base 'Film'; |
38 | sub DESTROY { shift->delete } |
39 | |
40 | 1; |
41 | |