1
unless (eval "use Module::Build::Compat 0.02; 1" ) {
2
print "This module requires Module::Build to install itself.\n";
4
require ExtUtils::MakeMaker;
5
my $yn = ExtUtils::MakeMaker::prompt
6
(' Install Module::Build from CPAN?', 'y');
13
# Save this 'cause CPAN will chdir all over the place.
15
my $makefile = File::Spec->rel2abs($0);
17
CPAN::Shell->install('Module::Build::Compat');
19
chdir $cwd or die "Cannot chdir() back to $cwd: $!";
20
exec $^X, $makefile, @ARGV; # Redo now that we have Module::Build
22
warn " *** Cannot install without Module::Build. Exiting ...\n";
26
Module::Build::Compat->run_build_pl(args => \@ARGV);
27
Module::Build::Compat->write_makefile();
8
use ExtUtils::MakeMaker;
10
# Check that we have a C compiler
14
( MM->can( 'signature_target' ) ? ( SIGN => 1 ) : () ),
15
NAME => 'Data::Structure::Util',
16
AUTHOR => 'Andy Armstrong <andy@hexten.net>',
17
VERSION_FROM => 'lib/Data/Structure/Util.pm',
18
ABSTRACT_FROM => 'lib/Data/Structure/Util.pm',
22
'Scalar::Util' => '1.01',
30
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
31
clean => { FILES => 'Data-Structure-Util-*' },
35
local $^W = 0; # Silence warning about non-numeric version
36
if ( $ExtUtils::MakeMaker::VERSION >= '6.31' ) {
37
$mm_args{LICENSE} = 'perl';
41
WriteMakefile( %mm_args );
46
my @lines = split /\n/, shift->SUPER::metafile_target( @_ );
48
my @exclude = qw( Devel::CheckLib IO::CaptureOutput );
50
die "Can't parse Makefile fragment"
51
unless $lines[-2] =~ /^([^"']*(["'])).*?(\2[^"']*)$/;
52
splice @lines, -1, 0, map { "$1$_$3" } (
53
'no_index:', "${pad}package:",
54
map { "${pad}${pad}- $_" } @exclude
57
return join "\n", @lines;