5 use ExtUtils::MakeMaker;
8 eval { require Config };
9 die 'OS unsupported' if $@;
10 Config->import(qw/%Config/);
14 my $pl = $Config{perl_patchlevel};
15 print "Checking perl patchlevel... ";
16 if (defined $pl && length $pl) {
18 push @DEFINES, DEFINE => '-DVMG_PERL_PATCHLEVEL=' . $pl;
24 my $BUILD_REQUIRES = {
26 'ExtUtils::MakeMaker' => 0,
31 my $tometa = ' >> $(DISTVNAME)/META.yml;';
32 my $build_req = 'echo "build_requires:" ' . $tometa;
33 foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) {
34 my $ver = $BUILD_REQUIRES->{$mod};
35 $build_req .= sprintf 'echo " %-30s %s" %s', "$mod:", $ver, $tometa;
41 NAME => 'Variable::Magic',
42 AUTHOR => 'Vincent Pit <perl@profvince.com>',
44 VERSION_FROM => 'lib/Variable/Magic.pm',
45 ABSTRACT_FROM => 'lib/Variable/Magic.pm',
54 PREOP => 'pod2text lib/Variable/Magic.pm > $(DISTVNAME)/README; '
56 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
58 clean => { FILES => 'Variable-Magic-* *.gcov *.gcda *.gcno cover_db' },