File Coverage

blib/lib/Enbld/Target/AttributeExtension/Command.pm
Criterion Covered Total %
statement 12 15 80.0
branch 4 6 66.6
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 20 26 76.9


line stmt bran cond sub pod time code
1             package Enbld::Target::AttributeExtension::Command;
2              
3 2     2   1323 use strict;
  2         4  
  2         60  
4 2     2   13 use warnings;
  2         3  
  2         77  
5              
6 2     2   9 use parent qw/Enbld::Target::Attribute/;
  2         4  
  2         10  
7              
8             our $make;
9              
10             sub make_command {
11              
12 138 100   138 0 1165 return $make if $make;
13              
14 1 50       34024 if ( `which gmake` ) {
    50          
15 0         0 return ( $make = 'gmake' );
16             } elsif ( `make -v 2>&1` =~ /GNU Make/ ) {
17 1         244 return ( $make = 'make' );
18             } else {
19 0           require Enbld::Error;
20 0           die( Enbld::Error->new( 'GNU Make is NOT installed' ));
21             }
22             }
23              
24             1;