| 1 | package Test::Alien::CanCompile; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use 5.008004; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | ▶ | use Test2::API qw( context ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | # ABSTRACT: Skip a test file unless a C compiler is available | ||||||||||
| 9 | 2 | our $VERSION = '2.88'; # VERSION | |||||||||
| 10 | |||||||||||
| 11 | |||||||||||
| 12 | sub skip | ||||||||||
| 13 | 5 | ▶ | { | ||||||||
|
Subroutine
skip: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 14 | 5 | require ExtUtils::CBuilder; | |||||||||
| 15 | 5 | ▶ | ExtUtils::CBuilder->new->have_compiler ? undef : 'This test requires a compiler.'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | sub import | ||||||||||
| 19 | 2 | ▶ | { | ||||||||
|
Subroutine
import: called CC=2 SCAR=7.0
| |||||||||||
| 20 | 2 | my $skip = __PACKAGE__->skip; | |||||||||
| 21 | 2 | ▶ | return unless defined $skip; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | |||||||||||
| 23 | 1 | my $ctx = context(); | |||||||||
| 24 | 1 | $ctx->plan(0, SKIP => $skip); | |||||||||
| 25 | 0 | $ctx->release; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 2 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||