line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::FieldInstance; |
2
|
40
|
|
|
40
|
|
187
|
use strictures; |
|
40
|
|
|
|
|
57
|
|
|
40
|
|
|
|
|
204
|
|
3
|
|
|
|
|
|
|
BEGIN { |
4
|
40
|
|
|
40
|
|
3363
|
$Net::Gnats::FieldInstance::VERSION = '0.20'; |
5
|
|
|
|
|
|
|
} |
6
|
40
|
|
|
40
|
|
207
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
58
|
|
|
40
|
|
|
|
|
7301
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
226
|
|
|
226
|
0
|
523
|
my ($class, %options) = @_; |
10
|
226
|
|
|
|
|
790
|
return bless \%options, $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub name { |
14
|
705
|
|
|
705
|
0
|
558
|
my ($self) = @_; |
15
|
705
|
100
|
|
|
|
1080
|
$self->{name} = $self->schema->name if not defined $self->{name}; |
16
|
705
|
|
|
|
|
1432
|
$self->{name}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub value { |
20
|
265
|
|
|
265
|
0
|
253
|
my ($self, $value) = @_; |
21
|
265
|
100
|
|
|
|
683
|
$self->{value} = $self->schema->default if not defined $self->{value}; |
22
|
265
|
100
|
|
|
|
427
|
$self->{value} = $value if defined $value; |
23
|
265
|
|
|
|
|
580
|
$self->{value}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
254
|
|
|
254
|
0
|
542
|
sub schema { return shift->{schema} } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |