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 or higher... ";
46 if ($^V ge v5.11.0 and not defined $pl) {
47 my $describe = $Config{git_describe};
48 # An empty 'describe' is fine
49 if (defined $describe and $describe !~ /^GitLive-/) {
51 push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=0';
54 print $is_5110rel ? "yes\n" : "no\n";
56 # Threads, Windows and 5.8.x don't seem to be best friends
57 if ($^O eq 'MSWin32' && $^V lt v5.9.0) {
58 push @DEFINES, '-DVMG_MULTIPLICITY=0';
61 # Fork emulation got "fixed" in 5.10.1
62 if ($^O eq 'MSWin32' && $^V lt v5.10.1) {
63 push @DEFINES, '-DVMG_FORKSAFE=0';
66 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
68 my $dist = 'Variable-Magic';
70 (my $name = $dist) =~ s{-}{::}g;
72 (my $file = $dist) =~ s{-}{/}g;
73 $file = "lib/$file.pm";
83 configure_requires => {
85 'ExtUtils::MakeMaker' => 0,
90 'ExtUtils::MakeMaker' => 0,
96 bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
97 homepage => "http://search.cpan.org/dist/$dist/",
98 license => 'http://dev.perl.org/licenses/',
99 repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
105 AUTHOR => 'Vincent Pit <perl@profvince.com>',
107 VERSION_FROM => $file,
108 ABSTRACT_FROM => $file,
111 PREREQ_PM => \%PREREQ_PM,
112 MIN_PERL_VERSION => 5.008,
113 META_MERGE => \%META,
115 PREOP => "pod2text $file > \$(DISTVNAME)/README",
116 COMPRESS => 'gzip -9f', SUFFIX => 'gz'
119 FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"