Everything.pm

filter: Statementstmt 62.9% 17 / 27 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 57.8% 22 / 38 CC 3 SCAR 12.9
CC
3
Cov
55%
import
8.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.6
« Everything/Adapter/InfluxDB/File.pm ↑ Summary Everything/Adapter.pm »
1 package Measure::Everything;
2  
3 # ABSTRACT: Log::Any for Stats
4 1 our $VERSION = '1.003'; # VERSION
5  
6 1 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Module::Runtime qw(use_module);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 our $global_stats;
12  
13 0 ▶sub import {
Subroutine import: not called CC=3 SCAR=20.8
14 0 my $class = shift;
15 0 my $target = shift;
16 0 my $caller = caller();
17  
18 0 ▶ $target ||= '$stats';
Condition0%0/2
$target ||= "\$stats"
l!l
00
MC/DC0%0/1
$target ||= "\$stats"
$target
Truth table0%0/2
A
A= $target
Aresult
11
00
19 0 $target =~ s/^\$//;
20  
21 0 ▶ if ( !$global_stats ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($Measure::Everything::global_stats) 0 0 0
22 0 $global_stats = use_module('Measure::Everything::Adapter::Null')->new;
23 }
24  
25 {
26 0 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.2
27 0 my $varname = "$caller\::" . $target;
28 0 *$varname = \$global_stats;
29 }
30 }
31  
32 1 1;
33  
34 __END__
« Everything/Adapter/InfluxDB/File.pm ↑ Summary Everything/Adapter.pm »