IDL/DocumentHeader.pm

filter: Statementstmt 55.0% 11 / 20 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 44.1% 15 / 34 CC 5 SCAR 29.5
CC
5
Cov
41%
namespace
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 19.1
« JSONProtocol.pm ↑ Summary IDL/Definition.pm »
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
BranchTrueFalseTotal
if ($namespace->scope eq $scope or $namespace->scope eq "*") 0 0 0
Condition0%0/3
$namespace->scope eq $scope or $namespace->scope eq "*"
l!l&&r!l&&!r
000
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 "*"
ABresult
1X1
011
000
41 0 my $value = $namespace->value;
42 0 ▶ if ($scope eq 'perl') {
Branch: 1 branch
BranchTrueFalseTotal
if ($scope eq "perl") 0 0 0
43 0 $value =~ s/\./::/g;
44 }
45 0 return $value;
46 }
47 }
48 0 return;
49 }
50  
51 4 1;
« JSONProtocol.pm ↑ Summary IDL/Definition.pm »