File Coverage

blib/lib/PDL/Install/Files.pm
Criterion Covered Total %
statement 5 6 83.3
branch 3 6 50.0
condition 1 3 33.3
subroutine 1 2 50.0
pod 0 2 0.0
total 10 19 52.6


line stmt bran cond sub pod time code
1             =head1 NAME
2              
3             PDL::Install::Files -- Module for use by L and L
4              
5             =head1 SYNOPSIS
6              
7             use Inline with => 'PDL';
8             # or alternatively, if your XS module uses PDL:
9             use ExtUtils::Depends;
10             my $pkg = ExtUtils::Depends->new(qw(MyPackage PDL));
11              
12             =head1 DESCRIPTION
13              
14             This module is for use by L and L. There are
15             no user-serviceable parts inside.
16              
17             =cut
18              
19             package PDL::Install::Files;
20             # support ExtUtils::Depends
21             require PDL::Core::Dev;
22              
23             our $VERSION = '2.009';
24              
25             $self = {
26             'typemaps' => [ &PDL::Core::Dev::PDL_TYPEMAP ],
27             'inc' => &PDL::Core::Dev::PDL_INCLUDE,
28             'libs' => '',
29             'deps' => [],
30             };
31             @deps = @{ $self->{deps} };
32             @typemaps = @{ $self->{typemaps} };
33             $libs = $self->{libs};
34             $inc = $self->{inc};
35             $CORE = undef;
36             foreach (@INC) {
37             if ( -f "$_/PDL/Install/Files.pm") { $CORE = $_ . "/PDL/Install/"; last; }
38             }
39              
40       0 0   sub deps { }
41             # support: use Inline with => 'PDL';
42              
43             require Inline;
44              
45             sub Inline {
46 1     1 0 10 my ($class, $lang) = @_;
47 1 50       5 return {} if $lang eq 'Pdlpp';
48 1 50       4 return unless $lang eq 'C';
49 1 50 33     11 unless($ENV{"PDL_Early_Inline"} // ($Inline::VERSION >= 0.68) ) {
50 0         0 die "PDL::Inline: requires Inline version 0.68 or higher to make sense\n (yours is $Inline::VERSION). You should upgrade Inline, \n or else set \$ENV{PDL_Early_Inline} to a true value to ignore this message.\n";
51             }
52             +{
53 1         4 TYPEMAPS => [ &PDL::Core::Dev::PDL_TYPEMAP ],
54             INC => &PDL::Core::Dev::PDL_INCLUDE,
55             AUTO_INCLUDE => &PDL::Core::Dev::PDL_AUTO_INCLUDE,
56             BOOT => &PDL::Core::Dev::PDL_BOOT,
57             };
58             }
59              
60             1;