line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Thrift::IDL::DocumentHeader; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Thrift::IDL::DocumentHeader |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Inherits from L |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
6
|
|
|
6
|
|
35
|
use strict; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
208
|
|
14
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
157
|
|
15
|
6
|
|
|
6
|
|
31
|
use base qw(Thrift::IDL::Base); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
1454
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw(namespaces includes path basename)); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 METHODS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 namespaces |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 includes |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 path |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head2 basename |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Scalar accessors |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 namespace ($scope) |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Searches through the C and returns the one that matches the named scope. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub namespace { |
37
|
17
|
|
|
17
|
1
|
1274
|
my ($self, $scope) = @_; |
38
|
|
|
|
|
|
|
|
39
|
17
|
|
|
|
|
21
|
foreach my $namespace (@{ $self->namespaces }) { |
|
17
|
|
|
|
|
63
|
|
40
|
17
|
50
|
33
|
|
|
213
|
if ($namespace->scope eq $scope || $namespace->scope eq '*') { |
41
|
17
|
|
|
|
|
253
|
my $value = $namespace->value; |
42
|
17
|
50
|
|
|
|
161
|
if ($scope eq 'perl') { |
43
|
17
|
|
|
|
|
43
|
$value =~ s/\./::/g; |
44
|
|
|
|
|
|
|
} |
45
|
17
|
|
|
|
|
61
|
return $value; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
0
|
|
|
|
|
|
return; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |