File Coverage

blib/lib/PDL/Install/Files.pm
Criterion Covered Total %
statement 10 11 90.9
branch 2 4 50.0
condition 2 5 40.0
subroutine 3 4 75.0
pod 0 2 0.0
total 17 26 65.3


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 1     1   15 use strict;
  1         7  
  1         51  
21 1     1   16 use warnings;
  1         2  
  1         730  
22             # support ExtUtils::Depends
23             require PDL::Core::Dev;
24              
25             our $VERSION = '2.009';
26              
27             my $self = {
28             'typemaps' => [ &PDL::Core::Dev::PDL_TYPEMAP ],
29             'inc' => &PDL::Core::Dev::PDL_INCLUDE,
30             'libs' => '',
31             'deps' => [],
32             };
33             our @deps = @{ $self->{deps} };
34             our @typemaps = @{ $self->{typemaps} };
35             our $libs = $self->{libs};
36             our $inc = $self->{inc};
37             our $CORE = undef;
38             foreach (@INC) {
39             if ( -f "$_/PDL/Install/Files.pm") { $CORE = $_ . "/PDL/Install/"; last; }
40             }
41              
42       0 0   sub deps { }
43             # support: use Inline with => 'PDL';
44              
45             sub Inline {
46 1     1 0 13 my ($class, $lang) = @_;
47 1 50       7 return {} if $lang eq 'Pdlpp';
48 1 50 50     14 unless ($ENV{"PDL_Early_Inline"} || (($Inline::VERSION//0.68) >= 0.68)) {
      33        
49 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";
50             }
51             +{
52 1         4 TYPEMAPS => [ &PDL::Core::Dev::PDL_TYPEMAP ],
53             INC => &PDL::Core::Dev::PDL_INCLUDE,
54             AUTO_INCLUDE => &PDL::Core::Dev::PDL_AUTO_INCLUDE,
55             BOOT => &PDL::Core::Dev::PDL_BOOT,
56             };
57             }
58              
59             1;