line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Thrift::IDL::Field; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Thrift::IDL::Field |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Inherits from L |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
6
|
|
|
6
|
|
36
|
use strict; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
201
|
|
14
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
184
|
|
15
|
6
|
|
|
6
|
|
33
|
use base qw(Thrift::IDL::Base); |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
1076
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw(id optional type name default_value)); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 METHODS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 id |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 optional |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 type |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head2 name |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 default_value |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Scalar accessors |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub to_str { |
35
|
55
|
|
|
55
|
0
|
77
|
my ($self) = @_; |
36
|
|
|
|
|
|
|
|
37
|
116
|
|
|
|
|
1145
|
return sprintf '%s (%s)', |
38
|
|
|
|
|
|
|
$self->name, |
39
|
|
|
|
|
|
|
join(', ', |
40
|
220
|
|
|
|
|
2045
|
map { $_ .': '. $self->$_ } |
41
|
55
|
|
|
|
|
154
|
grep { defined $self->$_ } |
42
|
|
|
|
|
|
|
qw(id type optional default_value) |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |