| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package List::Filter::StorageBase; |
|
2
|
1
|
|
|
1
|
|
8
|
use base qw( Class::Base ); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
121
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
StorageBase - base class for filter storage plugins |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package List::Filter::Storage::NewFormat; |
|
12
|
|
|
|
|
|
|
use base qw( List::Filter::StorageBase ); |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub init { |
|
15
|
|
|
|
|
|
|
} |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub lookup { |
|
18
|
|
|
|
|
|
|
# ... |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub save { |
|
22
|
|
|
|
|
|
|
# ... |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub list_filters { |
|
26
|
|
|
|
|
|
|
# ... |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
This is module is purely an interface, which the storage plugins |
|
36
|
|
|
|
|
|
|
are intended to inherit from. The documentation of this module |
|
37
|
|
|
|
|
|
|
is thus oriented toward people interested in writing new storage plugins, |
|
38
|
|
|
|
|
|
|
see the existing plugins for documentation on how to use them. |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 OBJECT DATA |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
The main fields inside the object: |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=over |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item connect_to |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
In the case of DBI, this will be the database connection string, |
|
49
|
|
|
|
|
|
|
indicating the DBD driver and the database name. |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item owner |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
A user name, when required to make the connection. |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item password |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
A password, to go with the user name. |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item attributes |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
A hash reference of additional attributes to be used by the |
|
62
|
|
|
|
|
|
|
storage back-end in any way that seems appropriate. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
In the case of DBI, this hash ref might contain something like this: |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
{ RaiseError => 1, AutoCommit => 1 } |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
(Though there's no particular point in manipulating AutoCommit with |
|
69
|
|
|
|
|
|
|
storage needs this simple). |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item type |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
The type of the filters being stored (e.g. 'filter', 'transform'). |
|
74
|
|
|
|
|
|
|
Not to be confused with the data storage format (e.g 'YAML', 'DBI') |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item extra |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
A catch-all hash reference intended to be used primarily for |
|
79
|
|
|
|
|
|
|
internal storage purposes by the subclasses, e.g. in the case of |
|
80
|
|
|
|
|
|
|
YAML, this will contain a reference to the contents of an entire |
|
81
|
|
|
|
|
|
|
YAML file that has been slurped into memory. Writing additional |
|
82
|
|
|
|
|
|
|
accessors for the data inside of "extra" is strongly advised, to |
|
83
|
|
|
|
|
|
|
make it easier to modifiy the internal structure at a later date. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=back |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 METHODS |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
There are two main methods that need to be implemented: |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=over |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |
|
94
|
|
|
|
|
|
|
|
|
95
|
1
|
|
|
1
|
|
16
|
use 5.8.0; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
72
|
|
|
96
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
37
|
|
|
97
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
38
|
|
|
98
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
77
|
|
|
99
|
1
|
|
|
1
|
|
6
|
use Data::Dumper; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
54
|
|
|
100
|
1
|
|
|
1
|
|
6
|
use Hash::Util qw( lock_keys unlock_keys ); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
8
|
|
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
|
103
|
|
|
|
|
|
|
my $DEBUG = 0; |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item new |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Instantiates a new object. |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Takes an optional hashref as an argument, with named fields |
|
110
|
|
|
|
|
|
|
identical to the names of the object attributes. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
With no arguments, the newly created filter will be empty. |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=cut |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
# Note: "new" (inherited from Class::Base) |
|
117
|
|
|
|
|
|
|
# calls the following "init" routine automatically. |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item init |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Initialize object attributes and then lock them down to prevent |
|
122
|
|
|
|
|
|
|
accidental creation of new ones. |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Note: there is no leading underscore on name "init", though it's |
|
125
|
|
|
|
|
|
|
arguably an "internal" routine (i.e. not likely to be of use to |
|
126
|
|
|
|
|
|
|
client code). |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Optionally, a plugin may run additional initialization code inside |
|
129
|
|
|
|
|
|
|
of an init method that overrides this stub. |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=cut |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
sub init { |
|
134
|
53
|
|
|
53
|
1
|
83
|
my $self = shift; |
|
135
|
53
|
|
|
|
|
64
|
my $args = shift; |
|
136
|
53
|
|
|
|
|
59
|
unlock_keys( %{ $self } ); |
|
|
53
|
|
|
|
|
148
|
|
|
137
|
|
|
|
|
|
|
|
|
138
|
53
|
50
|
|
|
|
332
|
if ($DEBUG) { |
|
139
|
0
|
|
|
|
|
0
|
$self->debugging(1); |
|
140
|
|
|
|
|
|
|
} |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
# define new attributes |
|
143
|
|
|
|
|
|
|
my $attributes = { |
|
144
|
|
|
|
|
|
|
connect_to => $args->{ connect_to }, |
|
145
|
|
|
|
|
|
|
owner => $args->{ owner }, |
|
146
|
|
|
|
|
|
|
password => $args->{ password }, |
|
147
|
|
|
|
|
|
|
attributes => $args->{ attributes }, |
|
148
|
|
|
|
|
|
|
type => $args->{ type }, # type of filters to be stored |
|
149
|
53
|
|
|
|
|
321
|
extra => {}, # internal storage, etc. keys not locked. |
|
150
|
|
|
|
|
|
|
}; |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
# add attributes to object |
|
153
|
53
|
|
|
|
|
76
|
my @fields = (keys %{ $attributes }); |
|
|
53
|
|
|
|
|
224
|
|
|
154
|
53
|
|
|
|
|
100
|
@{ $self }{ @fields } = @{ $attributes }{ @fields }; # hash slice |
|
|
53
|
|
|
|
|
249
|
|
|
|
53
|
|
|
|
|
123
|
|
|
155
|
|
|
|
|
|
|
|
|
156
|
53
|
|
|
|
|
135
|
lock_keys( %{ $self } ); |
|
|
53
|
|
|
|
|
170
|
|
|
157
|
53
|
|
|
|
|
676
|
return $self; |
|
158
|
|
|
|
|
|
|
} |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=item define_filter_class |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
From the type of the stored filters (e.g. 'filter', 'transform'), |
|
165
|
|
|
|
|
|
|
determine the appropriate class. |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
This implements the convention: |
|
168
|
|
|
|
|
|
|
List::Filter::, except that for type 'filter' the class is |
|
169
|
|
|
|
|
|
|
just "List::Filter". |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=cut |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub define_filter_class { |
|
174
|
12
|
|
|
12
|
1
|
22
|
my $self = shift; |
|
175
|
12
|
|
|
|
|
51
|
my $type = $self->type; |
|
176
|
12
|
|
|
|
|
22
|
my $class; |
|
177
|
12
|
50
|
|
|
|
74
|
if (not ($type) ) { |
|
|
|
100
|
|
|
|
|
|
|
178
|
0
|
|
|
|
|
0
|
croak "define_filter_class in StorageBase at line " . __LINE__ . ": needs a defined 'type' (e.g. 'filter', 'transform')."; |
|
179
|
|
|
|
|
|
|
} elsif ($type eq 'filter') { |
|
180
|
9
|
|
|
|
|
18
|
$class = 'List::Filter'; |
|
181
|
|
|
|
|
|
|
} else { |
|
182
|
3
|
|
|
|
|
13
|
$class = 'List::Filter::' . ucfirst( $type ); |
|
183
|
|
|
|
|
|
|
} |
|
184
|
12
|
|
|
|
|
36
|
return $class; |
|
185
|
|
|
|
|
|
|
} |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=back |
|
190
|
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head2 main methods (stubs) |
|
192
|
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=over |
|
194
|
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=item lookup |
|
196
|
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
Given a name, returns the first filter found with a matching name. |
|
198
|
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=cut |
|
200
|
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
sub lookup { |
|
202
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
203
|
0
|
|
|
|
|
0
|
my $name = shift; |
|
204
|
0
|
|
|
|
|
0
|
my $class = ref $self; |
|
205
|
0
|
|
|
|
|
0
|
carp "The lookup method has not been implemented for this class: $class."; |
|
206
|
0
|
|
|
|
|
0
|
return undef; |
|
207
|
|
|
|
|
|
|
} |
|
208
|
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=item save |
|
211
|
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
Given a filter saves it to the storage location indicated by the |
|
213
|
|
|
|
|
|
|
"write_storage" setting of the List::Filter::Storage |
|
214
|
|
|
|
|
|
|
object, using the name indicated by the "name" field inside of |
|
215
|
|
|
|
|
|
|
the filter. |
|
216
|
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
=cut |
|
218
|
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
sub save { |
|
220
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
221
|
0
|
|
|
|
|
0
|
my $filter = shift; |
|
222
|
0
|
|
|
|
|
0
|
my $class = ref $self; |
|
223
|
0
|
|
|
|
|
0
|
carp "The save method has not been implemented for this class: $class"; |
|
224
|
0
|
|
|
|
|
0
|
return undef; |
|
225
|
|
|
|
|
|
|
} |
|
226
|
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=item list_filters |
|
230
|
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
Returns a list of all available filters. |
|
232
|
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=cut |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
sub list_filters { |
|
236
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
237
|
0
|
|
|
|
|
0
|
carp "The list_filters method has not been implemented for this class."; |
|
238
|
0
|
|
|
|
|
0
|
return undef; |
|
239
|
|
|
|
|
|
|
} |
|
240
|
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=back |
|
244
|
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
=head2 basic accessors |
|
246
|
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=over |
|
248
|
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
=item connect_to |
|
250
|
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
Getter for object attribute connect_to |
|
252
|
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
=cut |
|
254
|
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
sub connect_to { |
|
256
|
19
|
|
|
19
|
1
|
32
|
my $self = shift; |
|
257
|
19
|
|
|
|
|
44
|
my $connect_to = $self->{ connect_to }; |
|
258
|
19
|
|
|
|
|
46
|
return $connect_to; |
|
259
|
|
|
|
|
|
|
} |
|
260
|
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
=item owner |
|
263
|
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
Getter for object attribute owner |
|
265
|
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
=cut |
|
267
|
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
sub owner { |
|
269
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
270
|
0
|
|
|
|
|
0
|
my $owner = $self->{ owner }; |
|
271
|
0
|
|
|
|
|
0
|
return $owner; |
|
272
|
|
|
|
|
|
|
} |
|
273
|
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=item set_owner |
|
275
|
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
Setter for object attribute set_owner |
|
277
|
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
=cut |
|
279
|
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
sub set_owner { |
|
281
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
282
|
0
|
|
|
|
|
0
|
my $owner = shift; |
|
283
|
0
|
|
|
|
|
0
|
$self->{ owner } = $owner; |
|
284
|
0
|
|
|
|
|
0
|
return $owner; |
|
285
|
|
|
|
|
|
|
} |
|
286
|
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
=item password |
|
289
|
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
Getter for object attribute password |
|
291
|
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
=cut |
|
293
|
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
sub password { |
|
295
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
296
|
0
|
|
|
|
|
0
|
my $password = $self->{ password }; |
|
297
|
0
|
|
|
|
|
0
|
return $password; |
|
298
|
|
|
|
|
|
|
} |
|
299
|
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
=item set_password |
|
301
|
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
Setter for object attribute set_password |
|
303
|
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
=cut |
|
305
|
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
sub set_password { |
|
307
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
308
|
0
|
|
|
|
|
0
|
my $password = shift; |
|
309
|
0
|
|
|
|
|
0
|
$self->{ password } = $password; |
|
310
|
0
|
|
|
|
|
0
|
return $password; |
|
311
|
|
|
|
|
|
|
} |
|
312
|
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
=item set_connect_to |
|
314
|
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
Setter for object attribute set_connect_to |
|
316
|
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
=cut |
|
318
|
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
sub set_connect_to { |
|
320
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
321
|
0
|
|
|
|
|
0
|
my $connect_to = shift; |
|
322
|
0
|
|
|
|
|
0
|
$self->{ connect_to } = $connect_to; |
|
323
|
0
|
|
|
|
|
0
|
return $connect_to; |
|
324
|
|
|
|
|
|
|
} |
|
325
|
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
=item attributes |
|
329
|
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
Getter for object attribute attributes |
|
331
|
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
=cut |
|
333
|
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
sub attributes { |
|
335
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
336
|
0
|
|
|
|
|
0
|
my $attributes = $self->{ attributes }; |
|
337
|
0
|
|
|
|
|
0
|
return $attributes; |
|
338
|
|
|
|
|
|
|
} |
|
339
|
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
=item set_attributes |
|
341
|
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
Setter for object attribute set_attributes |
|
343
|
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
=cut |
|
345
|
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
sub set_attributes { |
|
347
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
348
|
0
|
|
|
|
|
0
|
my $attributes = shift; |
|
349
|
0
|
|
|
|
|
0
|
$self->{ attributes } = $attributes; |
|
350
|
0
|
|
|
|
|
0
|
return $attributes; |
|
351
|
|
|
|
|
|
|
} |
|
352
|
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
=item type |
|
354
|
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
Getter for object attribute type |
|
356
|
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
=cut |
|
358
|
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
sub type { |
|
360
|
26
|
|
|
26
|
1
|
67
|
my $self = shift; |
|
361
|
26
|
|
|
|
|
52
|
my $type = $self->{ type }; |
|
362
|
26
|
|
|
|
|
98
|
return $type; |
|
363
|
|
|
|
|
|
|
} |
|
364
|
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
=item set_type |
|
366
|
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
Setter for object attribute set_type |
|
368
|
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
=cut |
|
370
|
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
sub set_type { |
|
372
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
373
|
0
|
|
|
|
|
0
|
my $type = shift; |
|
374
|
0
|
|
|
|
|
0
|
$self->{ type } = $type; |
|
375
|
0
|
|
|
|
|
0
|
return $type; |
|
376
|
|
|
|
|
|
|
} |
|
377
|
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
=item extra |
|
379
|
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
Getter for object attribute extra |
|
381
|
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
=cut |
|
383
|
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
sub extra { |
|
385
|
78
|
|
|
78
|
1
|
111
|
my $self = shift; |
|
386
|
78
|
|
|
|
|
134
|
my $extra = $self->{ extra }; |
|
387
|
78
|
|
|
|
|
265
|
return $extra; |
|
388
|
|
|
|
|
|
|
} |
|
389
|
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
=item set_extra |
|
391
|
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
Setter for object attribute set_extra |
|
393
|
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=cut |
|
395
|
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
sub set_extra { |
|
397
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
398
|
0
|
|
|
|
|
|
my $extra = shift; |
|
399
|
0
|
|
|
|
|
|
$self->{ extra } = $extra; |
|
400
|
0
|
|
|
|
|
|
return $extra; |
|
401
|
|
|
|
|
|
|
} |
|
402
|
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
1; |
|
409
|
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
=back |
|
412
|
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
414
|
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
L |
|
416
|
|
|
|
|
|
|
L |
|
417
|
|
|
|
|
|
|
L |
|
418
|
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
=head1 AUTHOR |
|
420
|
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
Joseph Brenner, Edoom@kzsu.stanford.eduE, |
|
422
|
|
|
|
|
|
|
18 May 2007 |
|
423
|
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
425
|
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
Copyright (C) 2007 by Joseph Brenner |
|
427
|
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
|
429
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.2 or, |
|
430
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
|
431
|
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
=head1 BUGS |
|
433
|
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
None reported... yet. |
|
435
|
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
=cut |