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_002'; # TRIAL
4              
5             $Alien::Kiwisolver::VERSION = '0.002002';
6 1     1   2096 use strict;
  1         2  
  1         30  
7 1     1   6 use warnings;
  1         2  
  1         28  
8              
9 1     1   485 use parent qw(Alien::Base);
  1         301  
  1         6  
10              
11             sub inline_auto_include {
12 6     6 1 26510 return [ 'kiwi/kiwi.h' ];
13             }
14              
15             sub Inline {
16 3     3 0 4109367 my ($self, $lang) = @_;
17              
18 3 50       70 if( $lang =~ /^CPP$/ ) {
19 3         47 my $params = Alien::Base::Inline(@_);
20              
21 3         62 $params->{CCFLAGSEX} = '-std=c++11';
22              
23 3         9 $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         43 return $params;
36             }
37             }
38              
39              
40             1;
41              
42             __END__