File Coverage

blib/lib/BACnet/DataTypes/Bone.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 20 22 90.9


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3             package BACnet::DataTypes::Bone;
4              
5 27     27   162 use warnings;
  27         48  
  27         1509  
6 27     27   139 use strict;
  27         79  
  27         705  
7              
8              
9 27     27   109 use BACnet::DataTypes::Utils;
  27         69  
  27         4964  
10              
11             #bone serves as parsing tool it is not BACnet data type
12              
13             # skeleton for sequences and choice is reference to array of bones
14              
15             sub construct {
16 4947     4947 0 220554 my ( $class, @rest ) = @_;
17              
18 4947         15281 my %args = (
19             tag => undef,
20             name => undef,
21             dt => undef,
22             skeleton => undef,
23             wrapped => undef,
24             substitution => undef,
25             @rest,
26             );
27              
28             my $self = {
29             tag => $args{tag},
30             name => $args{name},
31             dt => $args{dt},
32             skeleton => $args{skeleton},
33             wrapped => $args{wrapped},
34             substitution => $args{substitution},
35 4947         18813 };
36              
37 4947         19854 return bless $self, $class;
38             }
39              
40             sub set_name {
41 7     7 0 16 my ( $self, $name ) = @_;
42              
43 7         22 $self->{name} = $name;
44             }
45              
46             1;