lib/FFI/Build/Platform.pm

filter: Statementstmt 81.4% 167 / 205 Branchbran 53.7% 43 / 80 Conditioncond 42.1% 16 / 38 MC/DCmcdc 4.1% 1 / 24 Subroutinesub 97.3% 37 / 38 Podpod 100% 23 / 23 totaltotal 70.3% 287 / 408 CC 57 SCAR 20.2
CC
57
Cov
70%
cxx
32.3
ldflags
11.9
for
9.8
CRAP 7.6
« lib/FFI/Probe/Runner/Builder.pm ↑ Summary lib/FFI/Probe.pm »
1 package FFI::Build::Platform;
2  
3 17 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 17 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 17 ▶use 5.008004;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 17 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 17 ▶use Text::ParseWords ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 17 ▶use FFI::Temp;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 17 ▶use Capture::Tiny ();
Subroutine BEGIN: called CC=1 SCAR=0.0
10 17 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 17 ▶use FFI::Platypus::ShareConfig;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 # ABSTRACT: Platform specific configuration.
14 17 our $VERSION = '2.14_01'; # TRIAL VERSION
15  
16  
17 sub new
18 46 ▶{
Subroutine new: called CC=2 SCAR=7.0
Pod documented
19 46 my($class, $config) = @_;
20 46 ▶ $config ||= do {
Condition66%2/3
$config ||= do { require Config; \%Config::Config }
l!l&&r!l&&!r
2440
MC/DC0%0/2
$config ||= do { require Config; \%Config::Config }
$config do { require Config; \%Config::Config }
Truth table66%2/3
A ||= B
A= $configB= do { require Config; \%Config::Config }
ABresult
1X1
011
000
21 44 require Config;
22 44 \%Config::Config;
23 };
24 46 my $self = bless {
25 config => $config,
26 }, $class;
27 46 $self;
28 }
29  
30  
31 17 my $default;
32 sub default
33 47 ▶{
Subroutine default: called CC=2 SCAR=7.2
Pod documented
34 47 ▶ $default ||= FFI::Build::Platform->new;
Condition66%2/3
$default ||= "FFI::Build::Platform"->new
l!l&&r!l&&!r
35120
MC/DC0%0/2
$default ||= "FFI::Build::Platform"->new
$default "FFI::Build::Platform"->new
Truth table66%2/3
A ||= B
A= $defaultB= "FFI::Build::Platform"->new
ABresult
1X1
011
000
35 }
36  
37 sub _self
38 1945 ▶{
Subroutine _self: called CC=2 SCAR=6.9
39 1945 my($self) = @_;
40 1945 ▶ ref $self ? $self : $self->default;
Branch: 1 branch
BranchTrueFalseTotal
ref $self ? : 1938 7 1945
41 }
42  
43  
44 sub osname
45 1057 ▶{
Subroutine osname: called CC=1 SCAR=0.0
Pod documented
46 1057 _self(shift)->{config}->{osname};
47 }
48  
49  
50 sub object_suffix
51 69 ▶{
Subroutine object_suffix: called CC=1 SCAR=0.0
Pod documented
52 69 _self(shift)->{config}->{obj_ext};
53 }
54  
55  
56 sub library_suffix
57 46 ▶{
Subroutine library_suffix: called CC=4 SCAR=14.8
Pod documented
58 46 my $self = _self(shift);
59 46 my $osname = $self->osname;
60 46 my @suffix;
61 46 ▶ if($osname eq 'darwin')
Branch: 2 branches
BranchTrueFalseTotal
if ($osname eq 'darwin') { } 0 46 46
elsif ($osname =~ /^(MSWin32|msys|cygwin)$/) { } 0 46 46
62 {
63 0 push @suffix, '.dylib', '.bundle';
64 }
65 elsif($osname =~ /^(MSWin32|msys|cygwin)$/)
66 {
67 0 push @suffix, '.dll';
68 }
69 else
70 {
71 46 push @suffix, '.' . $self->{config}->{dlext};
72 }
73 46 ▶ wantarray ? @suffix : $suffix[0]; ## no critic (Community::Wantarray)
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 2 44 46
74 }
75  
76  
77 sub library_prefix
78 44 ▶{
Subroutine library_prefix: called CC=4 SCAR=17.9
Pod documented
79 44 my $self = _self(shift);
80  
81 # this almost certainly requires refinement.
82 44 ▶ if($self->osname eq 'cygwin')
Branch: 3 branches
BranchTrueFalseTotal
if ($self->osname eq 'cygwin') { } 0 44 44
elsif ($self->osname eq 'msys') { } 0 44 44
elsif ($self->osname eq 'MSWin32') { } 0 44 44
83 {
84 0 return 'cyg';
85 }
86 elsif($self->osname eq 'msys')
87 {
88 0 return 'msys-';
89 }
90 elsif($self->osname eq 'MSWin32')
91 {
92 0 return '';
93 }
94 else
95 {
96 44 return 'lib';
97 }
98 }
99  
100  
101 sub cc
102 90 ▶{
Subroutine cc: called CC=1 SCAR=0.0
Pod documented
103 90 my $self = _self(shift);
104 90 my $cc = $self->{config}->{cc};
105 90 [$self->shellwords($cc)];
106 }
107  
108  
109 sub cpp
110 0 ▶{
Subroutine cpp: not called CC=1 SCAR=6.9
Pod documented
111 0 my $self = _self(shift);
112 0 my $cpp = $self->{config}->{cpprun};
113 0 [$self->shellwords($cpp)];
114 }
115  
116  
117 sub cxx
118 13 ▶{
Subroutine cxx: called CC=10 SCAR=34.7
Pod documented
119 13 my $self = _self(shift);
120  
121 13 my @cc = @{ $self->cc };
122  
123 13 ▶ if($self->{config}->{ccname} eq 'gcc')
Branch: 2 branches
BranchTrueFalseTotal
if ($self->{'config'}{'ccname'} eq 'gcc') { } 13 0 13
elsif ($self->osname eq 'MSWin32' and $self->{'config'}{'ccname'} eq 'cl') { } 0 0 0
124 {
125 13 ▶ if($cc[0] =~ /gcc$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($cc[0] =~ /gcc$/) 0 13 13
126 {
127 0 my @maybe = @cc;
128 0 $maybe[0] =~ s/gcc$/g++/;
129 0 ▶ return \@maybe if $self->which($maybe[0]);
Branch: 1 branch
BranchTrueFalseTotal
if $self->which($maybe[0]) 0 0 0
130 }
131 13 ▶ if($cc[0] =~ /clang/)
Branch: 1 branch
BranchTrueFalseTotal
if ($cc[0] =~ /clang/) 0 13 13
132 {
133 0 my @maybe = @cc;
134 0 $maybe[0] =~ s/clang/clang++/;
135 0 ▶ return \@maybe if $self->which($maybe[0]);
Branch: 1 branch
BranchTrueFalseTotal
if $self->which($maybe[0]) 0 0 0
136 }
137  
138 # TODO: there are probably situations, eg solaris
139 # where we don't want to try c++ in the case of
140 # a ccname = gcc ?
141 13 my @maybe = qw( c++ g++ clang++ );
142  
143 13 foreach my $maybe (@maybe)
144 {
145 13 ▶ return [$maybe] if $self->which($maybe);
Branch: 1 branch
BranchTrueFalseTotal
if $self->which($maybe) 13 0 13
146 }
147 }
148 ▶ elsif($self->osname eq 'MSWin32' && $self->{config}->{ccname} eq 'cl')
Condition0%0/3
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
!ll&&!rl&&r
000
MC/DC0%0/2
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
$self->osname eq "MSWin32" $self->{"config"}{"ccname"} eq "cl"
Truth table0%0/3
A and B
A= $self->osname eq "MSWin32"B= $self->{"config"}{"ccname"} eq "cl"
ABresult
0X0
100
111
149 {
150 # TODO: see https://github.com/PerlFFI/FFI-Platypus/issues/203
151 #return \@cc;
152 }
153  
154 0 Carp::croak("unable to detect corresponding C++ compiler");
155 }
156  
157  
158 sub cxxld
159 6 ▶{
Subroutine cxxld: called CC=3 SCAR=16.3
Pod documented
160 6 my $self = _self(shift);
161  
162 6 $DB::single = 1;
163  
164 # This is definitely not exhaustive or complete or even
165 # particularlly good. Patches welcome.
166  
167 6 ▶ if($self->osname eq 'darwin')
Branch: 1 branch
BranchTrueFalseTotal
if ($self->osname eq 'darwin') { } 0 6 6
168 {
169 0 my @cxx = @{ $self->cxx };
170 0 ▶ return [map { /^(cc|clang|gcc)$/ ? @cxx : $_ } @{ $self->ld }];
Branch: 1 branch
BranchTrueFalseTotal
/^(cc|clang|gcc)$/ ? : 0 0 0
171 }
172 else
173 {
174 6 return $self->cxx;
175 }
176 }
177  
178  
179 sub for
180 2 ▶{
Subroutine for: called CC=6 SCAR=22.9
Pod documented
181 2 my $self = _self(shift);
182  
183 2 my @cc = @{ $self->cc };
184  
185 2 ▶ if($self->{config}->{ccname} eq 'gcc')
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'config'}{'ccname'} eq 'gcc') { } 2 0 2
186 {
187 2 ▶ if($cc[0] =~ /gcc$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($cc[0] =~ /gcc$/) 0 2 2
188 {
189 0 my @maybe = @cc;
190 0 $maybe[0] =~ s/gcc$/gfortran/;
191 0 ▶ return \@maybe if $self->which($maybe[0]);
Branch: 1 branch
BranchTrueFalseTotal
if $self->which($maybe[0]) 0 0 0
192 }
193  
194 2 foreach my $maybe (qw( gfortran ))
195 {
196 2 ▶ return [$maybe] if $self->which($maybe);
Branch: 1 branch
BranchTrueFalseTotal
if $self->which($maybe) 0 2 2
197 }
198 }
199 else
200 {
201 0 Carp::croak("unable to detect correspnding Fortran Compiler");
202 }
203 }
204  
205  
206 sub ld
207 24 ▶{
Subroutine ld: called CC=1 SCAR=0.0
Pod documented
208 24 my($self) = @_;
209 24 my $ld = $self->{config}->{ld};
210 24 [$self->shellwords($ld)];
211 }
212  
213  
214 sub shellwords
215 389 ▶{
Subroutine shellwords: called CC=4 SCAR=14.2
Pod documented
216 389 my $self = _self(shift);
217  
218 389 my $win = !!($self->osname eq 'MSWin32');
219  
220 1136 grep { defined $_ } map {
221 389 ref $_
222 # if we have an array ref then it has already been shellworded
223 ? @$_
224 389 ▶ : do {
Branch: 1 branch
BranchTrueFalseTotal
ref $_ ? : 148 241 389
225 # remove leading whitespace, confuses some older versions of shellwords
226 241 ▶ my $str = /^\s*(.*)$/ && $1;
Condition33%1/3
/^\s*(.*)$/ && $1
!ll&&!rl&&r
00241
MC/DC0%0/2
/^\s*(.*)$/ && $1
/^\s*(.*)$/ $1
Truth table33%1/3
A && B
A= /^\s*(.*)$/B= $1
ABresult
0X0
100
111
227 # escape things on windows
228 241 ▶ $str =~ s,\\,\\\\,g if $win;
Branch: 1 branch
BranchTrueFalseTotal
if $win 0 241 241
229 241 Text::ParseWords::shellwords($str);
230 }
231 } @_;
232  
233 }
234  
235  
236 sub ccflags
237 78 ▶{
Subroutine ccflags: called CC=2 SCAR=6.9
Pod documented
238 78 my $self = _self(shift);
239 78 my @ccflags;
240 78 push @ccflags, $self->shellwords($self->{config}->{cccdlflags});
241 78 push @ccflags, $self->shellwords($self->{config}->{ccflags});
242 78 push @ccflags, $self->shellwords($self->{config}->{optimize});
243 78 my $dist_include = eval { File::Spec->catdir(FFI::Platypus::ShareConfig::dist_dir('FFI-Platypus'), 'include') };
244 78 ▶ push @ccflags, "-I$dist_include" unless $@;
Branch: 1 branch
BranchTrueFalseTotal
unless $@ 42 36 78
245 78 \@ccflags;
246 }
247  
248  
249 sub ldflags
250 24 ▶{
Subroutine ldflags: called CC=7 SCAR=24.8
Pod documented
251 24 my $self = _self(shift);
252 24 my @ldflags = $self->shellwords($self->{config}->{lddlflags});
253 24 ▶ if($self->osname eq 'cygwin')
Branch: 4 branches
BranchTrueFalseTotal
if ($self->osname eq 'cygwin') { } 0 24 24
elsif ($self->osname eq 'MSWin32' and $self->{'config'}{'ccname'} eq 'cl') { } 0 24 24
elsif ($self->osname eq 'MSWin32') { } 0 24 24
elsif ($self->osname eq 'darwin') { } 0 24 24
254 {
255 17 ▶ no warnings 'qw';
Subroutine BEGIN: called CC=1 SCAR=0.0
256 # doesn't appear to be necessary, Perl has this in lddlflags already on cygwin
257 #push @ldflags, qw( -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base );
258 }
259 ▶ elsif($self->osname eq 'MSWin32' && $self->{config}->{ccname} eq 'cl')
Condition33%1/3
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
!ll&&!rl&&r
2400
MC/DC0%0/2
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
$self->osname eq "MSWin32" $self->{"config"}{"ccname"} eq "cl"
Truth table33%1/3
A and B
A= $self->osname eq "MSWin32"B= $self->{"config"}{"ccname"} eq "cl"
ABresult
0X0
100
111
260 {
261 0 push @ldflags, qw( -dll );
262 0 @ldflags = grep !/^-nodefaultlib$/, @ldflags;
263 }
264 elsif($self->osname eq 'MSWin32')
265 {
266 17 ▶ no warnings 'qw';
Subroutine BEGIN: called CC=1 SCAR=0.0
267 0 push @ldflags, qw( -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base );
268 }
269 elsif($self->osname eq 'darwin')
270 {
271 # we want to build a .dylib instead of a .bundle
272 0 ▶ @ldflags = map { $_ eq '-bundle' ? '-dynamiclib' : $_ } @ldflags;
Branch: 1 branch
BranchTrueFalseTotal
$_ eq '-bundle' ? : 0 0 0
273 }
274 24 \@ldflags;
275 }
276  
277  
278 sub cc_mm_works
279 8 ▶{
Subroutine cc_mm_works: called CC=7 SCAR=19.8
Pod documented
280 8 my $self = _self(shift);
281 8 my $verbose = shift;
282 8 ▶ $verbose ||= 0;
Condition100%2/2
$verbose ||= 0
l!l
17
MC/DC100%1/1
$verbose ||= 0
$verbose
Truth table100%2/2
A
A= $verbose
Aresult
11
00
283  
284 8 ▶ unless(defined $self->{cc_mm_works})
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $self->{"cc_mm_works"}) 6 2 8
285 {
286 6 require FFI::Build::File::C;
287 6 my $c = FFI::Build::File::C->new(\"#include \"foo.h\"\n");
288 6 my $dir = FFI::Temp->newdir;
289 {
290 6 open my $fh, '>', "$dir/foo.h";
291 6 print $fh "\n";
292 6 close $fh;
293 }
294  
295 6 my @cmd = (
296 $self->cc,
297 $self->ccflags,
298 "-I$dir",
299 '-MM',
300 $c->path,
301 );
302  
303 6 ▶ my($out, $exit) = Capture::Tiny::capture_merged(sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
304 6 $self->run(@cmd);
305 6 });
306  
307 6 ▶ if($verbose >= 2)
Branch: 2 branches
BranchTrueFalseTotal
if ($verbose >= 2) { } 0 6 6
elsif ($verbose >= 1) { } 1 5 6
308 {
309 0 print $out;
310 }
311 elsif($verbose >= 1)
312 {
313 1 print "CC (checkfor -MM)\n";
314 }
315  
316  
317 6 ▶ if(!$exit && $out =~ /foo\.h/)
Branch: 1 branch
BranchTrueFalseTotal
if (not $exit and $out =~ /foo\.h/) { } 6 0 6
Condition33%1/3
not $exit and $out =~ /foo\.h/
!ll&&!rl&&r
006
MC/DC0%0/2
not $exit and $out =~ /foo\.h/
not $exit $out =~ /foo\.h/
Truth table33%1/3
not(A) and B
A= not $exitB= $out =~ /foo\.h/
ABresult
0X0
100
111
318 {
319 6 $self->{cc_mm_works} = '-MM';
320 }
321 else
322 {
323 0 $self->{cc_mm_works} = 0;
324 }
325 }
326  
327 8 $self->{cc_mm_works};
328 }
329  
330  
331 sub flag_object_output
332 66 ▶{
Subroutine flag_object_output: called CC=3 SCAR=12.7
Pod documented
333 66 my $self = _self(shift);
334 66 my $file = shift;
335 66 ▶ if($self->osname eq 'MSWin32' && $self->{config}->{ccname} eq 'cl')
Branch: 1 branch
BranchTrueFalseTotal
if ($self->osname eq 'MSWin32' and $self->{'config'}{'ccname'} eq 'cl') { } 0 66 66
Condition33%1/3
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
!ll&&!rl&&r
6600
MC/DC0%0/2
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
$self->osname eq "MSWin32" $self->{"config"}{"ccname"} eq "cl"
Truth table33%1/3
A and B
A= $self->osname eq "MSWin32"B= $self->{"config"}{"ccname"} eq "cl"
ABresult
0X0
100
111
336 {
337 0 return ("-Fo$file");
338 }
339 else
340 {
341 66 return ('-o' => $file);
342 }
343 }
344  
345  
346 sub flag_library_output
347 22 ▶{
Subroutine flag_library_output: called CC=4 SCAR=17.2
Pod documented
348 22 my $self = _self(shift);
349 22 my $file = shift;
350 22 ▶ if($self->osname eq 'MSWin32' && $self->{config}->{ccname} eq 'cl')
Branch: 2 branches
BranchTrueFalseTotal
if ($self->osname eq 'MSWin32' and $self->{'config'}{'ccname'} eq 'cl') { } 0 22 22
elsif ($self->osname eq 'darwin') { } 0 22 22
Condition33%1/3
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
!ll&&!rl&&r
2200
MC/DC0%0/2
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
$self->osname eq "MSWin32" $self->{"config"}{"ccname"} eq "cl"
Truth table33%1/3
A and B
A= $self->osname eq "MSWin32"B= $self->{"config"}{"ccname"} eq "cl"
ABresult
0X0
100
111
351 {
352 0 return ("-OUT:$file");
353 }
354 elsif($self->osname eq 'darwin')
355 {
356 0 return ('-install_name' => "\@rpath/$file", -o => $file);
357 }
358 else
359 {
360 22 return ('-o' => $file);
361 }
362 }
363  
364  
365 sub flag_exe_output
366 7 ▶{
Subroutine flag_exe_output: called CC=3 SCAR=13.5
Pod documented
367 7 my $self = _self(shift);
368 7 my $file = shift;
369 7 ▶ if($self->osname eq 'MSWin32' && $self->{config}->{ccname} eq 'cl')
Branch: 1 branch
BranchTrueFalseTotal
if ($self->osname eq 'MSWin32' and $self->{'config'}{'ccname'} eq 'cl') { } 0 7 7
Condition33%1/3
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
!ll&&!rl&&r
700
MC/DC0%0/2
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
$self->osname eq "MSWin32" $self->{"config"}{"ccname"} eq "cl"
Truth table33%1/3
A and B
A= $self->osname eq "MSWin32"B= $self->{"config"}{"ccname"} eq "cl"
ABresult
0X0
100
111
370 {
371 0 my $file = File::Spec->rel2abs($file);
372 0 return ("/Fe:$file");
373 }
374 else
375 {
376 7 return ('-o' => $file);
377 }
378 }
379  
380  
381 sub flag_export
382 22 ▶{
Subroutine flag_export: called CC=3 SCAR=15.1
Pod documented
383 22 my $self = _self(shift);
384 22 ▶ return () unless $self->osname eq 'MSWin32' && $self->{config}->{ccname} eq 'cl';
Branch: 1 branch
BranchTrueFalseTotal
unless $self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl" 22 0 22
Condition33%1/3
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
!ll&&!rl&&r
2200
MC/DC0%0/2
$self->osname eq "MSWin32" and $self->{"config"}{"ccname"} eq "cl"
$self->osname eq "MSWin32" $self->{"config"}{"ccname"} eq "cl"
Truth table33%1/3
A and B
A= $self->osname eq "MSWin32"B= $self->{"config"}{"ccname"} eq "cl"
ABresult
0X0
100
111
385 0 return map { "/EXPORT:$_" } @_;
386 }
387  
388  
389 sub which
390 17 ▶{
Subroutine which: called CC=2 SCAR=6.9
Pod documented
391 17 my(undef, $command) = @_;
392 17 require IPC::Cmd;
393 17 ▶ my @command = ref $command ? @$command : ($command);
Branch: 1 branch
BranchTrueFalseTotal
ref $command ? : 2 15 17
394 17 IPC::Cmd::can_run($command[0]);
395 }
396  
397  
398 sub run
399 101 ▶{
Subroutine run: called CC=2 SCAR=6.9
Pod documented
400 101 my $self = shift;
401 101 ▶ my @command = map { ref $_ ? @$_ : $_ } grep { defined $_ } @_;
Branch: 1 branch
BranchTrueFalseTotal
ref $_ ? : 308 412 720
402 101 print "+@command\n";
403 101 system @command;
404 101 $?;
405 }
406  
407  
408 8 ▶sub _c { join ',', @_ }
Subroutine _c: called CC=1 SCAR=0.0
409 14 ▶sub _l { join ' ', map { ref $_ ? @$_ : $_ } @_ }
Subroutine _l: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
ref $_ ? : 12 2 14
410  
411 sub diag
412 2 ▶{
Subroutine diag: called CC=4 SCAR=13.9
Pod documented
413 2 my $self = _self(shift);
414 2 my @diag;
415  
416 2 push @diag, "osname : ". _c($self->osname);
417 2 push @diag, "cc : ". _l($self->cc);
418 2 ▶ push @diag, "cxx : ". (eval { _l($self->cxx) } || '---' );
Condition50%1/2
eval { do { _l($self->cxx) } } || '---'
l!l
20
MC/DC0%0/1
eval { do { _l($self->cxx) } } || '---'
eval { do { _l($self->cxx) } }
Truth table50%1/2
A
A= eval { do { _l($self->cxx) } }
Aresult
11
00
419 2 ▶ push @diag, "cxxld : ". (eval { _l($self->cxxld) } || '---' );
Condition50%1/2
eval { do { _l($self->cxxld) } } || '---'
l!l
20
MC/DC0%0/1
eval { do { _l($self->cxxld) } } || '---'
eval { do { _l($self->cxxld) } }
Truth table50%1/2
A
A= eval { do { _l($self->cxxld) } }
Aresult
11
00
420 2 ▶ push @diag, "for : ". (eval { _l($self->for) } || '---' );
Condition50%1/2
eval { do { _l($self->for) } } || '---'
l!l
02
MC/DC0%0/1
eval { do { _l($self->for) } } || '---'
eval { do { _l($self->for) } }
Truth table50%1/2
A
A= eval { do { _l($self->for) } }
Aresult
11
00
421 2 push @diag, "ld : ". _l($self->ld);
422 2 push @diag, "ccflags : ". _l($self->ccflags);
423 2 push @diag, "ldflags : ". _l($self->ldflags);
424 2 push @diag, "object suffix : ". _c($self->object_suffix);
425 2 push @diag, "library prefix : ". _c($self->library_prefix);
426 2 push @diag, "library suffix : ". _c($self->library_suffix);
427 2 push @diag, "cc mm works : ". $self->cc_mm_works;
428  
429 2 join "\n", @diag;
430 }
431  
432 17 1;
433  
434 __END__
« lib/FFI/Probe/Runner/Builder.pm ↑ Summary lib/FFI/Probe.pm »