Encoder/Custom.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 3 totaltotal 80.0% 20 / 25 CC 2 SCAR 3.0
CC
2
Cov
94%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Encoder/Data/Dumper.pm ↑ Summary Encoder/Storable.pm »
1 package Data::Encoder::Custom;
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  
6 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.1
Pod undocumented
7 1 my ($class, $args) = @_;
8 1 ▶ $args ||= {};
Condition50%1/2
$args ||= {}
l!l
10
MC/DC0%0/1
$args ||= {}
$args
Truth table50%1/2
A
A= $args
Aresult
11
00
9 1 bless { %$args }, __PACKAGE__;
10 }
11  
12 1 ▶sub encode {
Subroutine encode: called CC=1 SCAR=0.0
Pod undocumented
13 1 my ($self, $stuff, @args) = @_;
14 1 $self->{encoder}->($stuff, @args);
15 }
16  
17 1 ▶sub decode {
Subroutine decode: called CC=1 SCAR=0.0
Pod undocumented
18 1 my ($self, $stuff, @args) = @_;
19 1 $self->{decoder}->($stuff, @args);
20 }
21  
22 1 1;
23 __END__
« Encoder/Data/Dumper.pm ↑ Summary Encoder/Storable.pm »