| 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
| |||||||||||
| 17 | 1 | my $error = $@; | |||||||||
| 18 | 1 | ▶ | return $1 if $error =~ m/^(Perl \S* required)/i; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 0 | die $error; | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 1 | 1; | |||||||||
| 23 | |||||||||||
| 24 | __END__ | ||||||||||