File Coverage

blib/lib/InlineX/XS/MM.pm
Criterion Covered Total %
statement 12 31 38.7
branch 0 6 0.0
condition n/a
subroutine 4 6 66.6
pod 0 1 0.0
total 16 44 36.3


line stmt bran cond sub pod time code
1             package InlineX::XS::MM;
2 1     1   1386 use strict;
  1         2  
  1         44  
3 1     1   5 use warnings;
  1         1  
  1         41  
4              
5             our $VERSION = 0.01;
6              
7             require InlineX::XS;
8 1     1   1408 use ExtUtils::MakeMaker;
  1         108647  
  1         146  
9 1     1   879 use ExtUtils::Manifest 'maniadd';
  1         8807  
  1         352  
10              
11             sub import {
12 0     0     my $class = shift;
13 0           my @args = @_;
14              
15 0           $InlineX::XS::PACKAGE = $InlineX::XS::PACKAGE = 1;
16 0           $InlineX::XS::PACKAGER = $InlineX::XS::PACKAGER = 'InlineX::XS::MM';
17              
18 0           warn 'Setting PACKAGE and PACKAGER options';
19 0           unshift(@INC, 'lib');
20 0 0         chdir($args[0]) if defined $args[0];
21 0           return 1;
22             }
23              
24             sub hook_after_c2xs {
25 0     0 0   my $class = shift;
26 0           my $pkg = shift;
27              
28 0           warn 'Adding XS and C files to MANIFEST';
29 0           $pkg =~ /([^:]+)$/;
30 0 0         my $xs_file = $1 or die;
31 0           my $c_file = "src/$xs_file.c"; # no File::Spec => MANIFEST
32 0           $xs_file .= '.xs';
33 0           my $args = {
34             $xs_file => 'Added by '.__PACKAGE__,
35             $c_file => 'Added by '.__PACKAGE__,
36             };
37 0 0         $args->{'INLINE.h'} = 'Added by '.__PACKAGE__
38             if -e 'INLINE.h';
39              
40 0           maniadd($args);
41 0           return 1;
42             }
43              
44             1;
45