File: MyFilm.pm

package info (click to toggle)
libdbix-class-perl 0.082841-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 5,236 kB
  • sloc: perl: 26,763; sql: 322; makefile: 10
file content (27 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (5)
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
package # hide from PAUSE
    MyFilm;

use warnings;
use strict;

use base 'MyBase';
use MyStarLink;

__PACKAGE__->set_table();
__PACKAGE__->columns(All => qw/filmid title/);
__PACKAGE__->has_many(_stars => 'MyStarLink');
__PACKAGE__->columns(Stringify => 'title');

sub _carp { }

sub stars { map $_->star, shift->_stars }

sub create_sql {
  return qq{
    filmid  TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    title   VARCHAR(255)
  };
}

1;