blib/lib/any.pm

filter: Statementstmt 89.6% 26 / 29 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 78.0% 32 / 41 CC 5 SCAR 14.7
CC
5
Cov
74%
import
7.7
BEGIN
1.0
BEGIN
1.0
CRAP 4.3
↑ Summary
1 package any;
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 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use version;our $VERSION = qv('0.0.1');
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 our @module;
10 1 our $failed = {};
11  
12 1 ▶sub import {
Subroutine import: called CC=5 SCAR=20.4
13 1 shift;
14 1 local $UNIVERSAL::Level = $UNIVERSAL::Level + 1;
15 1 local $Carp::CarpLevel = $Carp::CarpLevel + 1;
16  
17 0 ▶ my @flags = map { $_ if $_ ne '-croak' } grep(/^-/, @_);
Branch: 1 branch
BranchTrueFalseTotal
if $_ ne "-croak" 0 0 0
18 1 @module = ();
19 1 $failed = {};
20
21 1 for my $mod (grep(!/^-/, @_)) {
22 1 ▶ use first $mod, @flags;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 0 ▶ push @module, $first::module if $first::module;
Branch: 1 branch
BranchTrueFalseTotal
if $first::module 0 0 0
24 0 ▶ $failed->{ $mod } = $first::failed->{ $mod } if exists $first::failed->{ $mod };
Branch: 1 branch
BranchTrueFalseTotal
if exists $first::failed->{$mod} 0 0 0
25 }
26 }
27  
28 1 1;
29  
30 __END__
↑ Summary