File Coverage

lib/CPANPLUS/Dist/Build/Constants.pm
Criterion Covered Total %
statement 20 21 95.2
branch 1 4 25.0
condition n/a
subroutine 6 6 100.0
pod n/a
total 27 31 87.1


line stmt bran cond sub pod time code
1             package CPANPLUS::Dist::Build::Constants;
2              
3 2     2   31 use strict;
  2         28  
  2         65  
4 2     2   31 use File::Spec;
  2         18  
  2         2259  
5              
6             BEGIN {
7              
8 2     2   35     require Exporter;
9 2     2   36     use vars qw[$VERSION @ISA @EXPORT];
  2         58  
  2         34  
10               
11 2         19     $VERSION = 0.01;
12 2         25     @ISA = qw[Exporter];
13 2         58     @EXPORT = qw[ BUILD_DIR BUILD ];
14             }
15              
16              
17             use constant BUILD_DIR => sub { return @_
18 0 0       0                                         ? File::Spec->catdir($_[0], '_build')
19                                                     : '_build';
20 2     2   31                             };
  2         19  
  2         154  
21             use constant BUILD => sub { return @_
22 2 50       360                                         ? File::Spec->catfile($_[0], 'Build')
23                                                     : 'Build';
24 2     2   33                             };
  2         46  
  2         26  
25                                         
26             1;
27              
28              
29             # Local variables:
30             # c-indentation-style: bsd
31             # c-basic-offset: 4
32             # indent-tabs-mode: nil
33             # End:
34             # vim: expandtab shiftwidth=4:
35