From: Vincent Pit Date: Sat, 23 Jun 2012 21:20:48 +0000 (+0200) Subject: Cleaner version numbers X-Git-Tag: rt77991~7 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=commitdiff_plain;h=78d307d30a1fa82e6b8e7ba95c617d9b87eb4d45 Cleaner version numbers --- diff --git a/Makefile.PL b/Makefile.PL index fe93d21..1ad0cea 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -20,7 +20,7 @@ my $as_perl = eval { my $is_as_822 = 0; print "Checking if this is ActiveState Perl 5.8.8 build 822 or higher... "; -if ("$]" == 5.008008 and defined $as_perl and $as_perl >= 822) { +if ("$]" == 5.008_008 and defined $as_perl and $as_perl >= 822) { $is_as_822 = 1; push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=1'; } @@ -52,7 +52,7 @@ if ($^O eq 'MSWin32' && "$]" < 5.009) { } # Fork emulation got "fixed" in 5.10.1 -if ($^O eq 'MSWin32' && "$]" < 5.010001) { +if ($^O eq 'MSWin32' && "$]" < 5.010_001) { push @DEFINES, '-DVMG_FORKSAFE=0'; print "Fork safety not ensured for perl 5.8.x and 5.10.0 on Windows.\n"; } @@ -104,7 +104,7 @@ WriteMakefile( PL_FILES => {}, @DEFINES, PREREQ_PM => \%PREREQ_PM, - MIN_PERL_VERSION => 5.008, + MIN_PERL_VERSION => '5.008', META_MERGE => \%META, dist => { PREOP => "pod2text -u $file > \$(DISTVNAME)/README", diff --git a/t/17-ctl.t b/t/17-ctl.t index c32d7f1..ef1be22 100644 --- a/t/17-ctl.t +++ b/t/17-ctl.t @@ -272,7 +272,7 @@ use Variable::Magic qw; BEGIN { cast %::, wizard fetch => sub { die my $suffix = "\nExecution(?s:.*)"; if ("$]" >= 5.017) { $suffix = "(?:\nsalsify at -e line \\d+.){16}" . $suffix; - } elsif ("$]" >= 5.011005) { + } elsif ("$]" >= 5.011_005) { $suffix = "(?:\nsalsify at -e line \\d+.){12}" . $suffix; } elsif ("$]" >= 5.011) { $suffix = "(?:\nsalsify at -e line \\d+.){3}" . $suffix; diff --git a/t/18-opinfo.t b/t/18-opinfo.t index 4da06b9..70b5f74 100644 --- a/t/18-opinfo.t +++ b/t/18-opinfo.t @@ -13,8 +13,8 @@ sub Variable::Magic::TestPkg::foo { } my $is_5130_release = ("$]" == 5.013 && !$Config{git_describe}) ? 1 : 0; -my $aelem = "$]" <= 5.008003 ? 'aelem' - : ("$]" < 5.013 or $is_5130_release) +my $aelem = "$]" <= 5.008_003 ? 'aelem' + : ("$]" < 5.013 or $is_5130_release) ? 'aelemfast' : 'sassign'; my $aelemf = ("$]" < 5.013 or $is_5130_release) ? 'aelemfast' : 'sassign'; diff --git a/t/30-scalar.t b/t/30-scalar.t index bc9004f..4189ee5 100644 --- a/t/30-scalar.t +++ b/t/30-scalar.t @@ -72,7 +72,7 @@ $b = watch { exists $a[1] } { }, 'array element: exists'; is $b, 1, 'scalar: array element: exists correctly'; # $b has to be set inside the block for the test to pass on 5.8.3 and lower -watch { $b = delete $a[1] } { get => 1, free => ("$]" > 5.008005 ? 1 : 0) }, +watch { $b = delete $a[1] } { get => 1, free => ("$]" > 5.008_005 ? 1 : 0) }, 'array element: delete'; is $b, 6, 'scalar: array element: delete correctly'; diff --git a/t/34-glob.t b/t/34-glob.t index 90821c5..1fe3df7 100644 --- a/t/34-glob.t +++ b/t/34-glob.t @@ -63,7 +63,7 @@ watch { watch { cast *b, $wiz } +{ }, 'cast 2'; } +{ }, 'scope end'; -%get = () if "$]" >= 5.013007; +%get = () if "$]" >= 5.013_007; watch { undef *a } +{ %get }, 'undef'; diff --git a/t/35-stash.t b/t/35-stash.t index ac00467..2403483 100644 --- a/t/35-stash.t +++ b/t/35-stash.t @@ -96,7 +96,7 @@ cast %Hlagh::, $wiz; is $@, "ok\n", 'stash: function calls compiled fine'; is_deeply \%mg, { fetch => \@calls, - store => ("$]" < 5.011002 ? \@calls : [ map { ($_) x 2 } @calls ]), + store => ("$]" < 5.011_002 ? \@calls : [ map { ($_) x 2 } @calls ]), }, 'stash: function calls'; } @@ -295,7 +295,7 @@ $_ => sub { CB } qw); -my $uo_exp = "$]" < 5.011002 ? 2 : 3; +my $uo_exp = "$]" < 5.011_002 ? 2 : 3; $code .= ', data => sub { +{ guard => 0 } }'; diff --git a/t/lib/Variable/Magic/TestThreads.pm b/t/lib/Variable/Magic/TestThreads.pm index 4a18667..f3ebc5d 100644 --- a/t/lib/Variable/Magic/TestThreads.pm +++ b/t/lib/Variable/Magic/TestThreads.pm @@ -27,7 +27,7 @@ sub import { skipall 'This perl wasn\'t built to support threads' unless $Config{useithreads}; skipall 'perl 5.13.4 required to test thread safety' - unless $force or "$]" >= 5.013004; + unless $force or "$]" >= 5.013_004; my $t_v = $force ? '0' : '1.67'; my $has_threads = do {