line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DSCS::Memory::Groups; #A table/row class |
2
|
1
|
|
|
1
|
|
883
|
use 5.010001; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
48
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
5
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
23
|
use parent qw(DSCS::Memory); |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
|
8
|
0
|
|
|
0
|
1
|
|
sub is_base_class{return 0} |
9
|
|
|
|
|
|
|
my $TABLE_NAME = 'groups'; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
1
|
|
sub TABLE {return $TABLE_NAME} |
12
|
0
|
|
|
0
|
1
|
|
sub PRIMARY_KEY{return 'id'} |
13
|
|
|
|
|
|
|
my $COLUMNS = [ |
14
|
|
|
|
|
|
|
'id', |
15
|
|
|
|
|
|
|
'group_name', |
16
|
|
|
|
|
|
|
'is blocked', |
17
|
|
|
|
|
|
|
'data' |
18
|
|
|
|
|
|
|
]; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
1
|
|
sub COLUMNS {return $COLUMNS} |
21
|
|
|
|
|
|
|
my $ALIASES = { |
22
|
|
|
|
|
|
|
'is blocked' => 'is_blocked', |
23
|
|
|
|
|
|
|
'data' => 'column_data' |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub ALIASES {return $ALIASES} |
27
|
|
|
|
|
|
|
my $CHECKS = { |
28
|
|
|
|
|
|
|
'group_name' => { |
29
|
|
|
|
|
|
|
'allow' => sub { "DUMMY" } |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
'id' => { |
32
|
|
|
|
|
|
|
'allow' => qr/^-?\d{1,}$/x |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
'data' => { |
35
|
|
|
|
|
|
|
'allow' => sub { "DUMMY" } |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
'is blocked' => { |
38
|
|
|
|
|
|
|
'allow' => qr/^-?\d{1,}$/x |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
1
|
|
sub CHECKS {return $CHECKS} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__PACKAGE__->QUOTE_IDENTIFIERS(1); |
45
|
|
|
|
|
|
|
#__PACKAGE__->BUILD;#build accessors during load |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=encoding utf8 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
A class for TABLE groups in schema main |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SYNOPSIS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 DESCRIPTION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 COLUMNS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Each column from table C has an accessor method in this class. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 id |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 group_name |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 is blocked |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 data |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 ALIASES |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 GENERATOR |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
L |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 SEE ALSO |
80
|
|
|
|
|
|
|
L, L, L |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |