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;
27 print "Checking if this is ActiveState Perl 5.8.8 build 822 or higher... ";
33 if (defined &ActivePerl::BUILD) {
34 my $build = int ActivePerl::BUILD();
37 push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=1';
42 print $is_as ? "yes\n" : "no\n";
45 print "Checking if this is a released perl 5.11.0... ";
46 if ($^V eq v5.11.0 and not defined $pl) {
47 my $describe = $Config{git_describe};
48 if (defined $describe and $describe !~ /^GitLive-/) {
50 push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=0';
53 print $is_5110rel ? "yes\n" : "no\n";
55 # Threads, Windows and 5.8.x don't seem to be best friends
56 if ($^O eq 'MSWin32' && $^V lt v5.9.0) {
57 push @DEFINES, '-DVMG_MULTIPLICITY=0';
60 # Fork emulation got "fixed" in 5.10.1
61 if ($^O eq 'MSWin32' && $^V lt v5.10.1) {
62 push @DEFINES, '-DVMG_FORKSAFE=0';
65 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
67 my $dist = 'Variable-Magic';
69 (my $name = $dist) =~ s{-}{::}g;
71 (my $file = $dist) =~ s{-}{/}g;
72 $file = "lib/$file.pm";
82 configure_requires => {
84 'ExtUtils::MakeMaker' => 0,
89 'ExtUtils::MakeMaker' => 0,
95 bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
96 homepage => "http://search.cpan.org/dist/$dist/",
97 license => 'http://dev.perl.org/licenses/',
98 repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
104 AUTHOR => 'Vincent Pit <perl@profvince.com>',
106 VERSION_FROM => $file,
107 ABSTRACT_FROM => $file,
110 PREREQ_PM => \%PREREQ_PM,
111 MIN_PERL_VERSION => 5.008,
112 META_MERGE => \%META,
114 PREOP => "pod2text $file > \$(DISTVNAME)/README",
115 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
118 FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"