File Coverage

blib/lib/Alien/Kiwisolver.pm
Criterion Covered Total %
statement 16 16 100.0
branch 1 2 50.0
condition n/a
subroutine 5 5 100.0
pod 1 2 50.0
total 23 25 92.0


line stmt bran cond sub pod time code
1             package Alien::Kiwisolver;
2             # ABSTRACT: Alien package for the Kiwi C++ implementation of the Cassowary constraint solving algorithm
3             $Alien::Kiwisolver::VERSION = '0.002_003'; # TRIAL
4              
5             $Alien::Kiwisolver::VERSION = '0.002003';
6 1     1   2557 use strict;
  1         3  
  1         33  
7 1     1   6 use warnings;
  1         1  
  1         39  
8              
9 1     1   522 use parent qw(Alien::Base);
  1         374  
  1         6  
10              
11             sub inline_auto_include {
12 6     6 1 26732 return [ 'kiwi/kiwi.h' ];
13             }
14              
15             sub Inline {
16 3     3 0 4141831 my ($self, $lang) = @_;
17              
18 3 50       67 if( $lang =~ /^CPP$/ ) {
19 3         44 my $params = Alien::Base::Inline(@_);
20              
21 3         45 $params->{CCFLAGSEX} = $self->runtime_prop->{cppstdflag};
22              
23 3         31 $params->{PRE_HEAD} = <<' EOF';
24             #if defined(_MSC_VER) || defined(__MINGW32__)
25             # define NO_XSLOCKS /* To avoid Perl wrappers of C library */
26             #endif
27              
28             #ifdef __cplusplus
29             // Avoid Perl's "seed" macro that breaks by including first.
30             #include
31             #endif
32              
33             EOF
34              
35 3         16 return $params;
36             }
37             }
38              
39              
40             1;
41              
42             __END__