Inference/Flyweight.pm untested

filter: Statementstmt 0.0% 0 / 8 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
get
2.0
set
2.0
CRAP 2.0
1 package Evo::Inference::Flyweight;
2  
3 sub new {
4 my ($class) = @_;
5  
6 my $self = {
7 x => undef,
8 };
9  
10 $class = ref($class) || $class;
11  
12 bless $self, $class;
13 }
14  
15 sub get {
16 my ($self) = @_;
17  
18 return $self->{x};
19 }
20  
21 sub set {
22 my ($self, $x) = @_;
23  
24 $self->{x} = $x;
25 }
26  
27 1;