| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Thrift::IDL::Definition; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Thrift::IDL::Definition |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Inherits from L |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
|
12
|
|
|
|
|
|
|
|
|
13
|
6
|
|
|
6
|
|
41
|
use strict; |
|
|
6
|
|
|
|
|
10
|
|
|
|
6
|
|
|
|
|
195
|
|
|
14
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
|
6
|
|
|
|
|
12
|
|
|
|
6
|
|
|
|
|
210
|
|
|
15
|
6
|
|
|
6
|
|
34
|
use base qw(Thrift::IDL::Base); |
|
|
6
|
|
|
|
|
249
|
|
|
|
6
|
|
|
|
|
2083
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 METHODS |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 full_name |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub full_name { |
|
24
|
14
|
|
|
14
|
1
|
67
|
my $self = shift; |
|
25
|
|
|
|
|
|
|
|
|
26
|
14
|
50
|
|
|
|
94
|
if (! $self->can('name')) { |
|
27
|
0
|
|
|
|
|
0
|
die ref($self)."->full_name() doesn't make contextual sense"; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
14
|
50
|
|
|
|
566
|
if (! $self->{header}) { |
|
30
|
0
|
|
|
|
|
0
|
die ref($self)."->full_name() has no header to compute the full name from"; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
14
|
|
|
|
|
62
|
my @parts = split /\./, $self->name; |
|
33
|
14
|
50
|
|
|
|
193
|
if (int @parts > 1) { |
|
34
|
0
|
|
|
|
|
0
|
return $self->name; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
else { |
|
37
|
14
|
|
50
|
|
|
191
|
return join '.', $self->{header}->basename || '', $self->name; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 local_name |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Returns the last part of the full_name. |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub local_name { |
|
48
|
7
|
|
|
7
|
1
|
560
|
my $self = shift; |
|
49
|
7
|
50
|
|
|
|
41
|
if (! $self->can('name')) { |
|
50
|
0
|
|
|
|
|
0
|
die ref($self)."->local_name() doesn't make contextual sense"; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
7
|
|
|
|
|
28
|
my @parts = split /\./, $self->name; |
|
53
|
7
|
|
|
|
|
111
|
return $parts[ $#parts ]; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |