IDL/Field.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 95.0% 19 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« IDL/Type/Base.pm ↑ Summary IDL/Constant.pm »
1 package Thrift::IDL::Field;
2  
3 =head1 NAME
4  
5 Thrift::IDL::Field
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(id optional type name default_value));
17  
18 =head1 METHODS
19  
20 =head2 id
21  
22 =head2 optional
23  
24 =head2 type
25  
26 =head2 name
27  
28 =head2 default_value
29  
30 Scalar accessors
31  
32 =cut
33  
34 4 ▶sub to_str {
Subroutine to_str: called CC=1 SCAR=0.0
Pod undocumented
35 4 my ($self) = @_;
36  
37 return sprintf '%s (%s)',
38 $self->name,
39 join(', ',
40 8 map { $_ .': '. $self->$_ }
41 4 grep { defined $self->$_ }
42 qw(id type optional default_value)
43 );
44 }
45  
46 4 1;
« IDL/Type/Base.pm ↑ Summary IDL/Constant.pm »