| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package ODS; |
|
2
|
|
|
|
|
|
|
|
|
3
|
73
|
|
|
73
|
|
4316289
|
use strict; use warnings; |
|
|
73
|
|
|
73
|
|
874
|
|
|
|
73
|
|
|
|
|
1565
|
|
|
|
73
|
|
|
|
|
350
|
|
|
|
73
|
|
|
|
|
81
|
|
|
|
73
|
|
|
|
|
2212
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
73
|
|
|
73
|
|
25242
|
use ODS::Table; |
|
|
73
|
|
|
|
|
154
|
|
|
|
73
|
|
|
|
|
3278
|
|
|
8
|
73
|
|
|
73
|
|
504
|
use Blessed::Merge; |
|
|
73
|
|
|
|
|
84
|
|
|
|
73
|
|
|
|
|
1288
|
|
|
9
|
73
|
|
|
73
|
|
351
|
use YAOO; |
|
|
73
|
|
|
|
|
439
|
|
|
|
73
|
|
|
|
|
511
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
|
12
|
87
|
|
|
87
|
|
5896
|
my $package = shift; |
|
13
|
73
|
|
|
73
|
|
23437
|
no strict 'refs'; |
|
|
73
|
|
|
|
|
87
|
|
|
|
73
|
|
|
|
|
27480
|
|
|
14
|
87
|
|
|
|
|
179
|
my $called = caller(); |
|
15
|
87
|
|
|
|
|
223
|
my $table = ODS::Table->new(); |
|
16
|
87
|
|
|
|
|
13816
|
my $bm = Blessed::Merge->new( |
|
17
|
|
|
|
|
|
|
blessed => 0, |
|
18
|
|
|
|
|
|
|
same => 0 |
|
19
|
|
|
|
|
|
|
); |
|
20
|
87
|
|
|
2782
|
|
1970
|
YAOO::make_keyword($called, "true", sub { 1; }); |
|
|
2782
|
|
|
|
|
9465
|
|
|
21
|
87
|
|
|
0
|
|
985
|
YAOO::make_keyword($called, "false", sub { 0; }); |
|
|
0
|
|
|
|
|
0
|
|
|
22
|
|
|
|
|
|
|
YAOO::make_keyword($called, "name", sub { |
|
23
|
86
|
|
|
86
|
|
27401
|
my (@args) = @_; |
|
24
|
86
|
|
|
|
|
457
|
$table->name(@args); |
|
25
|
87
|
|
|
|
|
746
|
}); |
|
26
|
|
|
|
|
|
|
YAOO::make_keyword($called, "options", sub { |
|
27
|
86
|
|
|
86
|
|
748
|
my (%args) = @_; |
|
28
|
86
|
|
|
|
|
188
|
$table->options($bm->merge($table->options, \%args)); |
|
29
|
87
|
|
|
|
|
848
|
}); |
|
30
|
|
|
|
|
|
|
YAOO::make_keyword($called, "column", sub { |
|
31
|
1108
|
|
|
1108
|
|
2237
|
my (@args) = @_; |
|
32
|
1108
|
50
|
|
|
|
1763
|
if (!$table->name) { |
|
33
|
0
|
|
|
|
|
0
|
$table->name([split "\:\:", $called]->[-1]); |
|
34
|
|
|
|
|
|
|
} |
|
35
|
1108
|
|
|
|
|
6653
|
$table->add_column(@args); |
|
36
|
87
|
|
|
|
|
868
|
}); |
|
37
|
|
|
|
|
|
|
YAOO::make_keyword($called, "storage_class", sub { |
|
38
|
0
|
|
|
0
|
|
0
|
my (@args) = @_; |
|
39
|
0
|
|
|
|
|
0
|
$table->storage_class(pop @args); |
|
40
|
87
|
|
|
|
|
901
|
}); |
|
41
|
|
|
|
|
|
|
YAOO::make_keyword($called, "connect", sub { |
|
42
|
142
|
|
|
142
|
|
46457
|
return $table->connect(@_); |
|
43
|
87
|
|
|
|
|
744
|
}); |
|
44
|
|
|
|
|
|
|
YAOO::make_keyword($called, "instantiate", sub { |
|
45
|
8
|
|
|
8
|
|
136
|
return $table->instantiate(@_); |
|
46
|
87
|
|
|
|
|
783
|
}); |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
ODS - Object Data Store |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Version 0.03 |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
package Table::Court; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
use ODS; |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
name "user"; |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
options ( |
|
68
|
|
|
|
|
|
|
custom => 1 |
|
69
|
|
|
|
|
|
|
); |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
column id => ( |
|
72
|
|
|
|
|
|
|
type => "integer", |
|
73
|
|
|
|
|
|
|
auto_increment => true, |
|
74
|
|
|
|
|
|
|
mandatory => true, |
|
75
|
|
|
|
|
|
|
filterable => true, |
|
76
|
|
|
|
|
|
|
sortable => true, |
|
77
|
|
|
|
|
|
|
no_render => true |
|
78
|
|
|
|
|
|
|
); |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
column first_name => ( |
|
81
|
|
|
|
|
|
|
type => "string", |
|
82
|
|
|
|
|
|
|
mandatory => true, |
|
83
|
|
|
|
|
|
|
filterable => true, |
|
84
|
|
|
|
|
|
|
sortable => true, |
|
85
|
|
|
|
|
|
|
); |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
column last_name => ( |
|
88
|
|
|
|
|
|
|
type => "string", |
|
89
|
|
|
|
|
|
|
mandatory => true, |
|
90
|
|
|
|
|
|
|
filterable => true, |
|
91
|
|
|
|
|
|
|
sortable => true, |
|
92
|
|
|
|
|
|
|
); |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
column diagnosis => ( |
|
95
|
|
|
|
|
|
|
type => "string", |
|
96
|
|
|
|
|
|
|
mandatory => true, |
|
97
|
|
|
|
|
|
|
filterable => true, |
|
98
|
|
|
|
|
|
|
sortable => true, |
|
99
|
|
|
|
|
|
|
); |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
1; |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
... |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
package ResultSet::Court; |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
use YAOO; |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
extends 'ODS::Table::ResultSet"; |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
has people => isa(string); |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
has miss_diagnosis => isa(object); |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
sub licenced_doctors { |
|
116
|
|
|
|
|
|
|
my ($self, %name) = @_; |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
$self->miss_diagnosis($self->find( |
|
119
|
|
|
|
|
|
|
%name |
|
120
|
|
|
|
|
|
|
)); |
|
121
|
|
|
|
|
|
|
} |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
... |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
package Row::Court; |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
use YAOO; |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
extends 'ODS::Table::Row'; |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
has barrister => isa(string); |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
... |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
my $data = Table::Court->connect('File::YAML', { |
|
136
|
|
|
|
|
|
|
file => 't/filedb/patients' |
|
137
|
|
|
|
|
|
|
}); |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
my $all = $data->all(); |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
my $misdiagnosis = $data->licenced_doctors({ first_name => 'Anonymous', last_name => 'Object' }); |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
$miss_diagnosis->update( |
|
144
|
|
|
|
|
|
|
diagnosis => 'psychosis' |
|
145
|
|
|
|
|
|
|
); |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 AUTHOR |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
LNATION, C<< >> |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head1 BUGS |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
|
154
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
|
155
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head1 SUPPORT |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
perldoc ODS |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
You can also look for information at: |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=over 4 |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
L |
|
171
|
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=item * CPAN Ratings |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
L |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=item * Search CPAN |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
L |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=back |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by LNATION. |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
This is free software, licensed under: |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=cut |
|
196
|
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
1; # End of ODS |