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.[78]... ";
27 if ($^O eq 'MSWin32' && $^V ge v5.8.7 && $^V lt v5.8.9) {
32 if (defined &Win32::BuildNumber) {
34 push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=1';
38 print $is_as ? "yes\n" : "no\n";
40 # Threads, Windows and 5.8.x don't seem to be best friends
41 if ($^O eq 'MSWin32' && $^V lt v5.9.0) {
42 push @DEFINES, '-DVMG_MULTIPLICITY=0';
45 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
47 my $BUILD_REQUIRES = {
49 'ExtUtils::MakeMaker' => 0,
54 my $tometa = ' >> $(DISTVNAME)/META.yml;';
55 my $build_req = 'echo "build_requires:" ' . $tometa;
56 foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) {
57 my $ver = $BUILD_REQUIRES->{$mod};
58 $build_req .= sprintf 'echo " %-30s %s" %s', "$mod:", $ver, $tometa;
64 NAME => 'Variable::Magic',
65 AUTHOR => 'Vincent Pit <perl@profvince.com>',
67 VERSION_FROM => 'lib/Variable/Magic.pm',
68 ABSTRACT_FROM => 'lib/Variable/Magic.pm',
77 PREOP => 'pod2text lib/Variable/Magic.pm > $(DISTVNAME)/README; '
79 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
81 clean => { FILES => 'Variable-Magic-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt' },