summaryrefslogtreecommitdiff
path: root/lib/VNDB/Types.pm
blob: c9217307b77310cff169e9b9c12ec905708643a5 (plain)
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 VNDB::Types;

use v5.12;
no strict 'refs';
use warnings;
use Exporter 'import';
use Tie::IxHash;

our @EXPORT;

sub hash {
    my $name = shift;
    tie $name->%*, 'Tie::IxHash', @_;
    push @EXPORT, "%$name";
}

sub fun($&) {
    my($name, $code) = @_;
    *$name = $code;
    push @EXPORT, $name;
}



# SQL: ENUM credit_type
hash CREDIT_TYPE =>
    scenario   => 'Scenario',
    chardesign => 'Character design',
    art        => 'Artist',
    music      => 'Composer',
    songs      => 'Vocals',
    director   => 'Director',
    staff      => 'Staff';