blib/lib/OPC/Part.pm

filter: Statementstmt 52.0% 13 / 25 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 4 totaltotal 43.5% 17 / 39 CC 2 SCAR 8.9
CC
2
Cov
48%
new
6.0
Content
2.0
SetContent
2.0
CRAP 2.4
« Build ↑ Summary blib/lib/OPC/Root.pm »
1 package OPC::Part;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use base 'OPC::Node';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub new {
9 0 ▶ my( $Class, %NodeParams ) = @_;
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
10  
11 0 my $Node = OPC::Node->new( %NodeParams );
12 0 my $PartName = $Node->Name;
13 0 ▶ unless( $Node->Package->HasPart( $PartName )) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($Node->Package->HasPart($PartName)) 0 0 0
14 0 Carp::confess "Part '$PartName' doesn't exist";
15 }
16  
17 0 return bless $Node, $Class;
18 }
19  
20 sub Content {
21 0 ▶ my $self = shift;
Subroutine Content: not called CC=1 SCAR=6.9
Pod undocumented
22 0 return $self->Package->PartContents( $self->Name );
23 }
24  
25 sub SetContent {
26 0 ▶ my ($self, $NewContents) = @_;
Subroutine SetContent: not called CC=1 SCAR=6.9
Pod undocumented
27 0 $self->Package->SetContents( $self->Name, $NewContents );
28 }
29  
30 sub PhysicalName {
31 0 ▶ my $self = shift;
Subroutine PhysicalName: not called CC=1 SCAR=6.9
Pod undocumented
32 0 return $self->Package->PhysicalNameByPartName( $self->Name );
33 }
34  
35 1 1;
« Build ↑ Summary blib/lib/OPC/Root.pm »