| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Test::Alien::CanCompile; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 2 |  |  | 2 |  | 202887 | use strict; | 
|  | 2 |  |  |  |  | 9 |  | 
|  | 2 |  |  |  |  | 58 |  | 
| 4 | 2 |  |  | 2 |  | 9 | use warnings; | 
|  | 2 |  |  |  |  | 5 |  | 
|  | 2 |  |  |  |  | 50 |  | 
| 5 | 2 |  |  | 2 |  | 54 | use 5.008004; | 
|  | 2 |  |  |  |  | 6 |  | 
| 6 | 2 |  |  | 2 |  | 11 | use Test2::API qw( context ); | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 356 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | # ABSTRACT: Skip a test file unless a C compiler is available | 
| 9 |  |  |  |  |  |  | our $VERSION = '2.47'; # VERSION | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  | sub skip | 
| 13 |  |  |  |  |  |  | { | 
| 14 | 5 |  |  | 5 | 0 | 193548 | require ExtUtils::CBuilder; | 
| 15 | 5 | 100 |  |  |  | 47 | ExtUtils::CBuilder->new->have_compiler ? undef : 'This test requires a compiler.'; | 
| 16 |  |  |  |  |  |  | } | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | sub import | 
| 19 |  |  |  |  |  |  | { | 
| 20 | 2 |  |  | 2 |  | 8887 | my $skip = __PACKAGE__->skip; | 
| 21 | 2 | 100 |  |  |  | 13433 | return unless defined $skip; | 
| 22 |  |  |  |  |  |  |  | 
| 23 | 1 |  |  |  |  | 145 | my $ctx = context(); | 
| 24 | 1 |  |  |  |  | 99 | $ctx->plan(0, SKIP => $skip); | 
| 25 | 0 |  |  |  |  |  | $ctx->release; | 
| 26 |  |  |  |  |  |  | } | 
| 27 |  |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | 1; | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | __END__ |