| 1 | package Thrift::IDL::DocumentHeader; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | =head1 NAME | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | Thrift::IDL::DocumentHeader | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | Inherits from L<Thrift::IDL::Base> | ||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | =cut | ||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 4 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | 4 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | 4 | ▶ | use base qw(Thrift::IDL::Base); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | 4 | __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<namespaces> and returns the one that matches the named scope. | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | =cut | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 0 | ▶ | sub namespace { | ||||||||||||||||||||||||||
|
Subroutine
namespace: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||
| 37 | 0 | my ($self, $scope) = @_; | |||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 0 | foreach my $namespace (@{ $self->namespaces }) { | |||||||||||||||||||||||||||
| 40 | 0 | ▶ | if ($namespace->scope eq $scope || $namespace->scope eq '*') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$namespace->scope eq $scope or $namespace->scope eq "*"
MC/DC0%0/2
$namespace->scope eq $scope or $namespace->scope eq "*"
$namespace->scope eq $scope
$namespace->scope eq "*"
Truth table0%0/3
A or B
A= $namespace->scope eq $scopeB= $namespace->scope eq "*"
| |||||||||||||||||||||||||||||
| 41 | 0 | my $value = $namespace->value; | |||||||||||||||||||||||||||
| 42 | 0 | ▶ | if ($scope eq 'perl') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 43 | 0 | $value =~ s/\./::/g; | |||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||
| 45 | 0 | return $value; | |||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||
| 48 | 0 | return; | |||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | 4 | 1; | |||||||||||||||||||||||||||