File: Album.pm

package info (click to toggle)
libdbix-class-candy-perl 0.002106-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 232 kB
  • ctags: 50
  • sloc: perl: 463; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 531 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package A::Schema::Result::Album;

use DBIx::Class::Candy -base => 'A::Schema::Result';

table 'albums';

primary_column id => {
   data_type => 'int',
   is_auto_increment => 1,
   is_numeric => 1,
};

has_column name => (
   data_type => 'varchar',
   size => 25,
   is_nullable => 1,
);

column artist_id => {
   data_type => 'int',
   is_nullable => 0,
};

has_many songs => 'A::Schema::Result::Song', 'album_id';

sub test_strict {
   require Test::More;
   eval '$foo = 1';
   Test::More::ok($@, 'strict mode is on');
}

1;