File Coverage

blib/lib/Set/Product.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 28 28 100.0


line stmt bran cond sub pod time code
1             package Set::Product;
2              
3 4     4   42089 use strict;
  4         8  
  4         90  
4 4     4   18 use warnings;
  4         6  
  4         102  
5              
6 4     4   19 use Carp qw(croak);
  4         9  
  4         224  
7 4     4   16 use Exporter qw(import);
  4         7  
  4         108  
8 4     4   1433 use Set::Product::PP;
  4         9  
  4         358  
9              
10             our $VERSION = '0.02';
11             $VERSION = eval $VERSION;
12              
13             our @EXPORT_OK = qw(product);
14              
15             my $want_xs = ! $ENV{SET_PRODUCT_PP} && ! $ENV{PURE_PERL}
16 2     2   740 && eval "use Set::Product::XS; 1";
  2         621  
  2         52  
17              
18 4     4   20 no warnings qw(redefine);
  4         24  
  4         729  
19              
20             *product = $want_xs
21             ? \&Set::Product::XS::product
22             : \&Set::Product::PP::product;
23              
24              
25             1;
26              
27             __END__