File Coverage

blib/lib/Test/Alien/CanPlatypus.pm
Criterion Covered Total %
statement 18 19 94.7
branch 4 4 100.0
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 28 30 93.3


line stmt bran cond sub pod time code
1             package Test::Alien::CanPlatypus;
2              
3 2     2   229346 use strict;
  2         10  
  2         61  
4 2     2   11 use warnings;
  2         3  
  2         44  
5 2     2   42 use 5.008004;
  2         7  
6 2     2   12 use Test2::API qw( context );
  2         5  
  2         331  
7              
8             # ABSTRACT: Skip a test file unless FFI::Platypus is available
9             our $VERSION = '2.45'; # VERSION
10              
11              
12             sub skip
13             {
14 4 100   4 0 50015 eval { require FFI::Platypus; 1 } ? undef : 'This test requires FFI::Platypus.';
  4         38  
  2         14  
15             }
16              
17             sub import
18             {
19 2     2   1709 my $skip = __PACKAGE__->skip;
20 2 100       300 return unless defined $skip;
21              
22 1         6 my $ctx = context();
23 1         95 $ctx->plan(0, SKIP => $skip);
24 0           $ctx->release;
25             }
26              
27             1;
28              
29             __END__