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) {
37 print $is_as ? "yes\n" : "no\n";
39 # Threads, Windows and 5.8.x don't seem to be best friends
40 if ($^O eq 'MSWin32' && $^V lt v5.9.0) {
41 push @DEFINES, '-DVMG_MULTIPLICITY=0';
44 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
46 my $BUILD_REQUIRES = {
48 'ExtUtils::MakeMaker' => 0,
53 my $tometa = ' >> $(DISTVNAME)/META.yml;';
54 my $build_req = 'echo "build_requires:" ' . $tometa;
55 foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) {
56 my $ver = $BUILD_REQUIRES->{$mod};
57 $build_req .= sprintf 'echo " %-30s %s" %s', "$mod:", $ver, $tometa;
63 'repository' => 'http://git.profvince.com/perl/modules/Variable-Magic.git',
64 'bugtracker' => 'http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Variable-Magic',
68 my $tometa = ' >> $(DISTVNAME)/META.yml;';
69 my $build_req = 'echo "resources:" ' . $tometa;
70 foreach my $res ( sort { lc $a cmp lc $b } keys %$RESOURCES ) {
71 my $val = $RESOURCES->{$res};
72 $build_req .= sprintf 'echo " %-15s %s" %s', "$res:", $val, $tometa;
78 NAME => 'Variable::Magic',
79 AUTHOR => 'Vincent Pit <perl@profvince.com>',
81 VERSION_FROM => 'lib/Variable/Magic.pm',
82 ABSTRACT_FROM => 'lib/Variable/Magic.pm',
91 PREOP => 'pod2text lib/Variable/Magic.pm > $(DISTVNAME)/README; '
92 . build_req . resources,
93 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
95 clean => { FILES => 'Variable-Magic-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt' },