Etch/Etchant.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 75.0% 6 / 8 Conditioncond 85.7% 6 / 7 MC/DCmcdc 50.0% 2 / 4 Subroutinesub 80.0% 8 / 10 Podpod 0.0% 0 / 8 totaltotal 71.1% 42 / 59 CC 8 SCAR 15.0
CC
8
Cov
86%
new
8.2
type
2.0
notes
2.0
CRAP 4.5
« Etch/Loading.pm ↑ Summary Etch/WetEtch.pm »
1 package Physics::Etch::Etchant;
2  
3 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 5 our $VERSION = '0.02';
7  
8 # The chemistry that does the etching.
9 #
10 # name short key, e.g. 'FeCl3'
11 # type 'wet' or 'dry'
12 # composition human string, e.g. 'Ferric chloride 40 Baume'
13 # or plasma feed gases, e.g. 'SF6 / O2'
14 # mechanism 'chemical' | 'physical' | 'ion-assisted'
15 # notes free text
16  
17 5 my %VALID_TYPE = ( wet => 1, dry => 1 );
18  
19 19 ▶sub new {
Subroutine new: called CC=8 SCAR=21.0
Pod undocumented
20 19 my ( $class, %args ) = @_;
21  
22 my $name = $args{name}
23 19 ▶ or die "Physics::Etch::Etchant: 'name' is required\n";
Branch: 1 branch
BranchTrueFalseTotal
my $name = $args{"name"} or die "Physics::Etch::Etchant: 'name' is required\n" 19 0 19
24 my $type = $args{type}
25 19 ▶ or die "Physics::Etch::Etchant: 'type' (wet|dry) is required\n";
Branch: 1 branch
BranchTrueFalseTotal
my $type = $args{"type"} or die "Physics::Etch::Etchant: 'type' (wet|dry) is required\n" 19 0 19
26 die "Physics::Etch::Etchant: type must be 'wet' or 'dry', got '$type'\n"
27 19 ▶ unless $VALID_TYPE{$type};
Branch: 1 branch
BranchTrueFalseTotal
unless $VALID_TYPE{$type} 1 18 19
28  
29 my $self = {
30 name => $name,
31 type => $type,
32 composition => $args{composition} // $name,
33 mechanism => $args{mechanism}
34 // ( $type eq 'wet' ? 'chemical' : 'ion-assisted' ),
35 18 ▶ notes => $args{notes} // '',
Branch: 1 branch
BranchTrueFalseTotal
$type eq 'wet' ? : 5 6 11
Condition85%6/7
$args{"composition"} // $name
l!l&&r!l&&!r
7110
$args{"mechanism"} // ($type eq "wet" ? "chemical" : "ion-assisted")
l!l
711
$args{"notes"} // ""
l!l
711
MC/DC0%0/2
$args{"composition"} // $name
$args{"composition"} $name
MC/DC100%1/1
$args{"mechanism"} // ($type eq "wet" ? "chemical" : "ion-assisted")
$args{"mechanism"}
MC/DC100%1/1
$args{"notes"} // ""
$args{"notes"}
Truth table66%2/3
A // B
A= $args{"composition"}B= $name
ABresult
1X1
011
000
Truth table100%2/2
A
A= $args{"mechanism"}
Aresult
11
00
Truth table100%2/2
A
A= $args{"notes"}
Aresult
11
00
36 };
37  
38 18 return bless $self, $class;
39 }
40  
41 1 ▶sub name { $_[0]->{name} }
Subroutine name: called CC=1 SCAR=0.0
Pod undocumented
42 0 ▶sub type { $_[0]->{type} }
Subroutine type: not called CC=1 SCAR=6.9
Pod undocumented
43 2 ▶sub composition { $_[0]->{composition} }
Subroutine composition: called CC=1 SCAR=0.0
Pod undocumented
44 2 ▶sub mechanism { $_[0]->{mechanism} }
Subroutine mechanism: called CC=1 SCAR=0.0
Pod undocumented
45 0 ▶sub notes { $_[0]->{notes} }
Subroutine notes: not called CC=1 SCAR=6.9
Pod undocumented
46  
47 1 ▶sub is_wet { $_[0]->{type} eq 'wet' }
Subroutine is_wet: called CC=1 SCAR=0.0
Pod undocumented
48 1 ▶sub is_dry { $_[0]->{type} eq 'dry' }
Subroutine is_dry: called CC=1 SCAR=0.0
Pod undocumented
49  
50 5 1;
51  
52 __END__
« Etch/Loading.pm ↑ Summary Etch/WetEtch.pm »