File Coverage

builder/MyBuilder.pm
Criterion Covered Total %
statement 12 22 54.5
branch 0 4 0.0
condition 0 2 0.0
subroutine 4 5 80.0
pod 0 1 0.0
total 16 34 47.0


line stmt bran cond sub pod time code
1             package builder::MyBuilder;
2              
3 1     1   6 use strict;
  1         6  
  1         62  
4 1     1   8 use warnings;
  1         2  
  1         116  
5 1     1   566 use parent qw(Module::Build);
  1         370  
  1         5  
6 1     1   77875 use Devel::CheckCompiler 0.04;
  1         74589  
  1         154  
7              
8             sub new {
9 0     0 0   my $self = shift;
10 0           my %args = @_;
11 0 0         if ( $^O eq 'solaris') {
12 0           print "This module does not support Solaris.\n";
13 0           exit 0;
14             }
15            
16 0 0         if (check_compile(<<'...', executable => 1)) {
17             #ifndef _GNU_SOURCE
18             #define _GNU_SOURCE
19             #endif
20             #include
21              
22             int main(void)
23             {
24             return accept4(0, (void*)0, (void*)0, SOCK_CLOEXEC|SOCK_NONBLOCK);
25             }
26             ...
27 0   0       $args{extra_compiler_flags} ||= [];
28 0           push @{$args{extra_compiler_flags}}, '-DHAVE_ACCEPT4';
  0            
29             }
30 0           $self->SUPER::new(%args);
31             }
32              
33              
34             1;