IDL/Document.pm

filter: Statementstmt 40.5% 15 / 37 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 35.7% 5 / 14 Podpod 90.9% 10 / 11 totaltotal 48.3% 30 / 62 CC 1 SCAR 5.0
CC
1
Cov
41%
comments
2.0
typedefs
2.0
typedef_named
2.0
CRAP 1.6
« IDL/Comment.pm ↑ Summary IDL/Struct.pm »
1 package Thrift::IDL::Document;
2  
3 =head1 NAME
4  
5 Thrift::IDL::Document
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(children headers));
17  
18 =head1 METHODS
19  
20 =head2 children
21  
22 =head2 headers
23  
24 Scalar accessors
25  
26 =head2 services
27  
28 =head2 comments
29  
30 =head2 typedefs
31  
32 =head2 enums
33  
34 =head2 structs
35  
36 Returns array ref of children of named type
37  
38 =head2 service_named ($name)
39  
40 =head2 typedef_named ($name)
41  
42 =head2 struct_named ($name)
43  
44 =head2 object_named ($name)
45  
46 =head2 object_full_named ($name)
47  
48 Returns object found in named array with given key value
49  
50 =cut
51  
52 3 ▶sub services {
Subroutine services: called CC=1 SCAR=0.0
Pod documented
53 3 my $self = shift;
54 3 $self->children_of_type('Thrift::IDL::Service');
55 }
56  
57 2 ▶sub service_named {
Subroutine service_named: called CC=1 SCAR=0.0
Pod documented
58 2 my ($self, $name) = @_;
59 2 $self->array_search($name, 'services', 'name');
60 }
61  
62 0 ▶sub comments {
Subroutine comments: not called CC=1 SCAR=6.9
Pod documented
63 0 my $self = shift;
64 0 $self->children_of_type('Thrift::IDL::Comment');
65 }
66  
67 0 ▶sub typedefs {
Subroutine typedefs: not called CC=1 SCAR=6.9
Pod documented
68 0 my $self = shift;
69 0 $self->children_of_type('Thrift::IDL::TypeDef');
70 }
71  
72 0 ▶sub typedef_named {
Subroutine typedef_named: not called CC=1 SCAR=6.9
Pod documented
73 0 my ($self, $name) = @_;
74 0 $self->array_search($name, 'typedefs', 'name');
75 }
76  
77 0 ▶sub enums {
Subroutine enums: not called CC=1 SCAR=6.9
Pod documented
78 0 my $self = shift;
79 0 $self->children_of_type('Thrift::IDL::Enum');
80 }
81  
82 0 ▶sub structs {
Subroutine structs: not called CC=1 SCAR=6.9
Pod documented
83 0 my $self = shift;
84 0 $self->children_of_type('Thrift::IDL::Struct');
85 }
86  
87 0 ▶sub struct_named {
Subroutine struct_named: not called CC=1 SCAR=6.9
Pod documented
88 0 my ($self, $name) = @_;
89 0 $self->array_search($name, 'structs', 'name');
90 }
91  
92 0 ▶sub objects {
Subroutine objects: not called CC=1 SCAR=6.9
Pod undocumented
93 0 my $self = shift;
94 0 return [ @{ $self->structs }, @{ $self->typedefs }, @{ $self->services }, @{ $self->enums } ];
95 }
96  
97 0 ▶sub object_named {
Subroutine object_named: not called CC=1 SCAR=6.9
Pod documented
98 0 my ($self, $name) = @_;
99 0 $self->array_search($name, 'objects', 'name');
100 }
101  
102 0 ▶sub object_full_named {
Subroutine object_full_named: not called CC=1 SCAR=6.9
Pod documented
103 0 my ($self, $full_name) = @_;
104 0 $self->array_search($full_name, 'objects', 'full_name');
105 }
106  
107 4 1;
« IDL/Comment.pm ↑ Summary IDL/Struct.pm »