line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::FieldInstance; |
2
|
40
|
|
|
40
|
|
205
|
use strictures; |
|
40
|
|
|
|
|
76
|
|
|
40
|
|
|
|
|
229
|
|
3
|
|
|
|
|
|
|
BEGIN { |
4
|
40
|
|
|
40
|
|
8792
|
$Net::Gnats::FieldInstance::VERSION = '0.22'; |
5
|
|
|
|
|
|
|
} |
6
|
40
|
|
|
40
|
|
205
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
73
|
|
|
40
|
|
|
|
|
8812
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
251
|
|
|
251
|
0
|
766
|
my ($class, %options) = @_; |
10
|
251
|
|
|
|
|
845
|
return bless \%options, $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub name { |
14
|
775
|
|
|
775
|
0
|
942
|
my ($self) = @_; |
15
|
775
|
100
|
|
|
|
1706
|
$self->{name} = $self->schema->name if not defined $self->{name}; |
16
|
775
|
|
|
|
|
2280
|
$self->{name}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub value { |
20
|
290
|
|
|
290
|
0
|
425
|
my ($self, $value) = @_; |
21
|
290
|
100
|
|
|
|
731
|
$self->{value} = $self->schema->default if not defined $self->{value}; |
22
|
290
|
100
|
|
|
|
714
|
$self->{value} = $value if defined $value; |
23
|
290
|
|
|
|
|
903
|
$self->{value}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
276
|
|
|
276
|
0
|
869
|
sub schema { return shift->{schema} } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |