SIAM/ServiceUnit.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 100% 31 / 31 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« SIAM/Service.pm ↑ Summary
1 package SIAM::ServiceUnit;
2  
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use base 'SIAM::Object';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 ▶use SIAM::ServiceComponent;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 SIAM::ServiceUnit - Service Unit object class
13  
14 =head1 SYNOPSIS
15  
16 my $components = $svcunit->get_components();
17  
18 =head1 METHODS
19  
20 =head2 get_components
21  
22 Returns arrayref with SIAM::ServiceComponent objects
23  
24 =cut
25  
26 sub get_components
27 1 ▶{
Subroutine get_components: called CC=1 SCAR=0.0
Pod documented
28 1 my $self = shift;
29 1 return $self->get_contained_objects('SIAM::ServiceComponent');
30 }
31  
32  
33
34
35 # mandatory attributes
36  
37 3 my $mandatory_attributes =
38 [ 'siam.svcunit.name',
39 'siam.svcunit.type',
40 'siam.svcunit.inventory_id', ];
41  
42 sub _mandatory_attributes
43 7 ▶{
Subroutine _mandatory_attributes: called CC=1 SCAR=0.0
44 7 return $mandatory_attributes;
45 }
46  
47  
48 sub _manifest_attributes
49 1 ▶{
Subroutine _manifest_attributes: called CC=1 SCAR=0.0
50 1 my $ret = [];
51 1 push(@{$ret}, @{$mandatory_attributes},
52 1 @{ SIAM::ServiceComponent->_manifest_attributes() });
53  
54 1 return $ret;
55  
56 }
57  
58  
59 3 1;
60  
61 # Local Variables:
62 # mode: cperl
63 # indent-tabs-mode: nil
64 # cperl-indent-level: 4
65 # cperl-continued-statement-offset: 4
66 # cperl-continued-brace-offset: -4
67 # cperl-brace-offset: 0
68 # cperl-label-offset: -2
69 # End:
« SIAM/Service.pm ↑ Summary