From: Vincent Pit Date: Thu, 23 Sep 2010 14:45:12 +0000 (+0200) Subject: Clarify some logic in Makefile.PL X-Git-Tag: v0.44~9 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=5ee81319ae7bca761e7fa6f33df2794a1cb5be76;p=perl%2Fmodules%2FVariable-Magic.git Clarify some logic in Makefile.PL --- diff --git a/Makefile.PL b/Makefile.PL index a4bd42e..cef05b2 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -23,23 +23,18 @@ if (defined $pl && length $pl) { print "none\n"; } -my $is_as = 0; +my $as_perl = eval { + require ActivePerl; + defined &ActivePerl::BUILD ? ActivePerl::BUILD() : undef +}; + +my $is_as_822 = 0; print "Checking if this is ActiveState Perl 5.8.8 build 822 or higher... "; -if ($^V eq v5.8.8) { - eval { - require ActivePerl; - 1; - } and do { - if (defined &ActivePerl::BUILD) { - my $build = int ActivePerl::BUILD(); - if ($build >= 822) { - $is_as = 1; - push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=1'; - } - } - } +if ($^V eq v5.8.8 and defined $as_perl and $as_perl >= 822) { + $is_as_822 = 1; + push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=1'; } -print $is_as ? "yes\n" : "no\n"; +print $is_as_822 ? "yes\n" : "no\n"; my $is_5110rel = 0; print "Checking if this is a released perl 5.11.0 or higher... "; @@ -56,11 +51,13 @@ print $is_5110rel ? "yes\n" : "no\n"; # Threads, Windows and 5.8.x don't seem to be best friends if ($^O eq 'MSWin32' && $^V lt v5.9.0) { push @DEFINES, '-DVMG_MULTIPLICITY=0'; + print "Thread safety disabled for perl 5.8.x on Windows.\n" } # Fork emulation got "fixed" in 5.10.1 if ($^O eq 'MSWin32' && $^V lt v5.10.1) { push @DEFINES, '-DVMG_FORKSAFE=0'; + print "Fork safety not ensured for perl 5.8.x and 5.10.0 on Windows.\n"; } @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;