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   187630 use strict;
  2         9  
  2         49  
4 2     2   59 use warnings;
  2         6  
  2         46  
5 2     2   49 use 5.008004;
  2         7  
6 2     2   11 use Test2::API qw( context );
  2         5  
  2         305  
7              
8             # ABSTRACT: Skip a test file unless FFI::Platypus is available
9             our $VERSION = '2.47'; # VERSION
10              
11              
12             sub skip
13             {
14 4 100   4 0 40315 eval { require FFI::Platypus; 1 } ? undef : 'This test requires FFI::Platypus.';
  4         29  
  2         19  
15             }
16              
17             sub import
18             {
19 2     2   1500 my $skip = __PACKAGE__->skip;
20 2 100       239 return unless defined $skip;
21              
22 1         6 my $ctx = context();
23 1         81 $ctx->plan(0, SKIP => $skip);
24 0           $ctx->release;
25             }
26              
27             1;
28              
29             __END__