line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::FieldInstance; |
2
|
40
|
|
|
40
|
|
198
|
use strictures; |
|
40
|
|
|
|
|
67
|
|
|
40
|
|
|
|
|
207
|
|
3
|
|
|
|
|
|
|
BEGIN { |
4
|
40
|
|
|
40
|
|
3326
|
$Net::Gnats::FieldInstance::VERSION = '0.21'; |
5
|
|
|
|
|
|
|
} |
6
|
40
|
|
|
40
|
|
235
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
64
|
|
|
40
|
|
|
|
|
8265
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
251
|
|
|
251
|
0
|
660
|
my ($class, %options) = @_; |
10
|
251
|
|
|
|
|
954
|
return bless \%options, $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub name { |
14
|
775
|
|
|
775
|
0
|
670
|
my ($self) = @_; |
15
|
775
|
100
|
|
|
|
1276
|
$self->{name} = $self->schema->name if not defined $self->{name}; |
16
|
775
|
|
|
|
|
1701
|
$self->{name}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub value { |
20
|
290
|
|
|
290
|
0
|
310
|
my ($self, $value) = @_; |
21
|
290
|
100
|
|
|
|
583
|
$self->{value} = $self->schema->default if not defined $self->{value}; |
22
|
290
|
100
|
|
|
|
509
|
$self->{value} = $value if defined $value; |
23
|
290
|
|
|
|
|
732
|
$self->{value}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
276
|
|
|
276
|
0
|
607
|
sub schema { return shift->{schema} } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |