inc/A2_Build.pm

filter: Statementstmt 94.4% 17 / 18 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 2 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 70.5% 24 / 34 SCAR 14.3
CC
4
Cov
77%
find_perl_interpreter
5.3
BEGIN
1.0
BEGIN
1.0
CRAP 4.2
« Build ↑ Summary
1 #---------------------------------------------------------------------
2 package inc::A2_Build;
3 #
4 # Copyright 2006 Christopher J. Madsen
5 #
6 # Author: Christopher J. Madsen <perl@cjmweb.net>
7 # Created: 13 Mar 2006
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the same terms as Perl itself.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the
15 # GNU General Public License or the Artistic License for more details.
16 #
17 # Customize Module::Build for LibA2
18 #---------------------------------------------------------------------
19  
20 1 require 5.006;
21 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 1 ▶use Cwd 'abs_path';
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 1 ▶use base 'Module::Build';
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 #=====================================================================
27 # Package Global Variables:
28  
29 1 our $VERSION = '0.09';
30  
31 #=====================================================================
32  
33 sub find_perl_interpreter
34 {
35 1 ▶ my $self = shift @_;
Subroutine find_perl_interpreter: called CC=4 SCAR=16.6
Pod undocumented
36  
37 1 my $perl = $self->SUPER::find_perl_interpreter(@_);
38  
39 # Convert /usr/bin/perl5.8.6 to /usr/bin/perl:
40 # (if the latter is a symlink to the former)
41 1 my $base = $perl;
42 1 ▶ if ($base =~ s/[\d.]+$// and -l $base and abs_path($base) eq $perl) {
Branch: 1 branch
BranchTrueFalseTotal
if ($base =~ s/[\d.]+$// and -l $base and abs_path($base) eq $perl) 0 1 1
Condition33%2/6
$base =~ s/[\d.]+$// and -l $base and abs_path($base) eq $perl
!ll&&!rl&&r
100
$base =~ s/[\d.]+$// and -l $base
!ll&&!rl&&r
100
MC/DC0%0/3
$base =~ s/[\d.]+$// and -l $base and abs_path($base) eq $perl
$base =~ s/[\d.]+$// -l $base abs_path($base) eq $perl
Truth table25%1/4
A and B and C
A= $base =~ s/[\d.]+$//B= -l $baseC= abs_path($base) eq $perl
ABCresult
0XX0
10X0
1100
1111
43 0 $perl = $base;
44 }
45  
46 1 return $perl;
47 } # end find_perl_interpreter
48  
49 #=====================================================================
50 # Package Return Value:
51  
52 1 1;
« Build ↑ Summary