blib/lib/Data/Shared/Compiled.pm

filter: Statementstmt 95.4% 21 / 22 Branchbran 100% 8 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 100% 3 / 3 totaltotal 95.1% 39 / 41 CC 6 SCAR 8.4
CC
6
Cov
97%
DESTROY
4.0
raw
2.0
is_array
2.0
CRAP 2.3
« blib/lib/Data/Shared/Adapter/Sketch.pm ↑ Summary blib/lib/Data/Shared/Adapter/Set.pm »
1 package Data::Shared::Compiled;
2 39 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 39 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 39 ▶use Scalar::Util qw(refaddr);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 39 our $VERSION = '0.02';
7  
8 3 ▶sub components { return [ @{ $_[0]{components} } ] }
Subroutine components: called CC=1 SCAR=0.0
Pod documented
9 2 ▶sub raw { return $_[0]{is_array} ? [ @{ $_[0]{raw} } ] : $_[0]{raw} }
Subroutine raw: called CC=2 SCAR=6.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{'is_array'} ? : 1 1 2
10 2 ▶sub is_array { return $_[0]{is_array} ? 1 : 0 }
Subroutine is_array: called CC=2 SCAR=6.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{'is_array'} ? : 1 1 2
11  
12 0 ▶sub CLONE_SKIP { 1 }
Subroutine CLONE_SKIP: not called CC=1 SCAR=6.9
13  
14 560 ▶sub DESTROY {
Subroutine DESTROY: called CC=4 SCAR=13.9
15 560 my ($self) = @_;
16 560 ▶ my $owners = $self->{_owners} or return;
Branch: 1 branch
BranchTrueFalseTotal
my $owners = $self->{"_owners"} or return 413 147 560
17 413 my $id = refaddr($self);
18 413 for my $root (values %$owners) {
19 416 ▶ delete $root->{_compiled}{$id} if $root;
Branch: 1 branch
BranchTrueFalseTotal
if $root 410 6 416
20 }
21 }
22  
23 39 1;
24  
25 __END__
« blib/lib/Data/Shared/Adapter/Sketch.pm ↑ Summary blib/lib/Data/Shared/Adapter/Set.pm »