5 use ExtUtils::MakeMaker;
8 eval { require Config };
9 die 'OS unsupported' if $@;
10 Config->import(qw/%Config/);
15 my $pl = $Config{perl_patchlevel};
16 print "Checking perl patchlevel... ";
17 if (defined $pl && length $pl) {
19 push @DEFINES, '-DVMG_PERL_PATCHLEVEL=' . $pl;
26 print "Checking if this is Windows ActiveState 5.8.x... ";
27 if ($^O eq 'MSWin32' && $^V ge v5.8.7 && $^V lt v5.9.0) {
32 if (defined &Win32::BuildNumber) {
34 push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=1';
38 print $is_as ? "yes\n" : "no\n";
40 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
42 my $BUILD_REQUIRES = {
44 'ExtUtils::MakeMaker' => 0,
49 my $tometa = ' >> $(DISTVNAME)/META.yml;';
50 my $build_req = 'echo "build_requires:" ' . $tometa;
51 foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) {
52 my $ver = $BUILD_REQUIRES->{$mod};
53 $build_req .= sprintf 'echo " %-30s %s" %s', "$mod:", $ver, $tometa;
59 NAME => 'Variable::Magic',
60 AUTHOR => 'Vincent Pit <perl@profvince.com>',
62 VERSION_FROM => 'lib/Variable/Magic.pm',
63 ABSTRACT_FROM => 'lib/Variable/Magic.pm',
72 PREOP => 'pod2text lib/Variable/Magic.pm > $(DISTVNAME)/README; '
74 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
76 clean => { FILES => 'Variable-Magic-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt' },