blib/lib/Test2/Require/Perl.pm

filter: Statementstmt 96.5% 28 / 29 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 1 totaltotal 92.8% 39 / 42 CC 3 SCAR 4.7
CC
3
Cov
94%
skip
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.6
« blib/lib/Test2/Compare/Undef.pm ↑ Summary blib/lib/Test2/Plugin/BailOnFail.pm »
1 package Test2::Require::Perl;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use base 'Test2::Require';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '1.302226';
8  
9 1 ▶use Test2::Util qw/pkg_to_file/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Scalar::Util qw/reftype/;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 ▶sub skip {
Subroutine skip: called CC=3 SCAR=11.0
Pod undocumented
13 2 my $class = shift;
14 2 my ($ver) = @_;
15  
16 1 ▶ return undef if eval "no warnings 'portable'; require $ver; 1";
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
if eval "no warnings 'portable'; require $ver; 1" 1 1 2
17 1 my $error = $@;
18 1 ▶ return $1 if $error =~ m/^(Perl \S* required)/i;
Branch: 1 branch
BranchTrueFalseTotal
if $error =~ /^(Perl \S* required)/i 1 0 1
19 0 die $error;
20 }
21  
22 1 1;
23  
24 __END__
« blib/lib/Test2/Compare/Undef.pm ↑ Summary blib/lib/Test2/Plugin/BailOnFail.pm »