| 1 | package Set::Product; | ||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||
| 3 | 4 | ▶ | use strict; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 4 | 4 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||
| 6 | 4 | ▶ | use Carp qw(croak); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 7 | 4 | ▶ | use Exporter qw(import); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 8 | 4 | ▶ | use Set::Product::PP; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||
| 10 | 3 | our $VERSION = '0.02'; | |||||||||||||||||||||||||||||||||
| 11 | 3 | $VERSION = eval $VERSION; | |||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||
| 13 | 3 | our @EXPORT_OK = qw(product); | |||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||
| 15 | my $want_xs = ! $ENV{SET_PRODUCT_PP} && ! $ENV{PURE_PERL} | ||||||||||||||||||||||||||||||||||
| 16 | 3 | ▶ | && eval "use Set::Product::XS; 1"; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.1
Condition66%4/6
!($ENV{'SET_PRODUCT_PP'} || $ENV{'PURE_PERL'}) && eval 'use Set::Product::XS; 1'
$ENV{'SET_PRODUCT_PP'} || $ENV{'PURE_PERL'}
MC/DC0%0/3
!($ENV{'SET_PRODUCT_PP'} || $ENV{'PURE_PERL'}) && eval 'use Set::Product::XS; 1'
$ENV{'SET_PRODUCT_PP'}
$ENV{'PURE_PERL'}
eval 'use Set::Product::XS; 1'
Truth table0%0/4
not(A || B) && C
A= $ENV{'SET_PRODUCT_PP'}B= $ENV{'PURE_PERL'}C= eval 'use Set::Product::XS; 1'
| |||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||
| 18 | 4 | ▶ | no warnings qw(redefine); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||
| 20 | 2 | ▶ | *product = $want_xs | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 21 | ? \&Set::Product::XS::product | ||||||||||||||||||||||||||||||||||
| 22 | : \&Set::Product::PP::product; | ||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||
| 25 | 2 | 1; | |||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||
| 27 | __END__ | ||||||||||||||||||||||||||||||||||