| 1 | package CPANPLUS::Dist::Build::Constants; | ||
| 2 | $CPANPLUS::Dist::Build::Constants::VERSION = '0.88'; | ||
| 3 | #ABSTRACT: Constants for CPANPLUS::Dist::Build | ||
| 4 | |||
| 5 | use if $] > 5.017, 'deprecate'; | ||
| 6 | |||
| 7 | use strict; | ||
| 8 | use warnings; | ||
| 9 | use File::Spec; | ||
| 10 | |||
| 11 | BEGIN { | ||
| 12 | |||
| 13 | require Exporter; | ||
| 14 | use vars qw[@ISA @EXPORT]; | ||
| 15 | |||
| 16 | @ISA = qw[Exporter]; | ||
| 17 | @EXPORT = qw[ BUILD_DIR BUILD CPDB_PERL_WRAPPER]; | ||
| 18 | } | ||
| 19 | |||
| 20 | |||
| 21 | use constant BUILD_DIR => sub { return @_ | ||
| 22 | ? File::Spec->catdir($_[0], '_build') | ||
| 23 | : '_build'; | ||
| 24 | }; | ||
| 25 | use constant BUILD => sub { my $file = @_ | ||
| 26 | ? File::Spec->catfile($_[0], 'Build') | ||
| 27 | : 'Build'; | ||
| 28 | |||
| 29 | ### on VMS, '.com' is appended when | ||
| 30 | ### creating the Build file | ||
| 31 | $file .= '.com' if $^O eq 'VMS'; | ||
| 32 | |||
| 33 | return $file; | ||
| 34 | }; | ||
| 35 | |||
| 36 | |||
| 37 | use constant CPDB_PERL_WRAPPER => 'use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; }'; | ||
| 38 | |||
| 39 | 1; | ||
| 40 | |||
| 41 | |||
| 42 | # Local variables: | ||
| 43 | # c-indentation-style: bsd | ||
| 44 | # c-basic-offset: 4 | ||
| 45 | # indent-tabs-mode: nil | ||
| 46 | # End: | ||
| 47 | # vim: expandtab shiftwidth=4: | ||
| 48 | |||
| 49 | __END__ |