From: Vincent Pit Date: Mon, 1 Sep 2014 12:09:07 +0000 (+0200) Subject: Make t/35-stash.t pass on 5.21.4 X-Git-Tag: rt98525~2 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=commitdiff_plain;h=31d52b1760f1736186f4652cacb3636e4f96f3ba Make t/35-stash.t pass on 5.21.4 --- diff --git a/t/35-stash.t b/t/35-stash.t index 2dd9f44..9d094ea 100644 --- a/t/35-stash.t +++ b/t/35-stash.t @@ -92,11 +92,22 @@ cast %Hlagh::, $wiz; }; my @calls = qw; + my (@fetch, @store); + if ("$]" < 5.011_002) { + @fetch = @calls; + @store = @calls; + } elsif ("$]" < 5.021_004) { + @fetch = @calls; + @store = map { ($_) x 2 } @calls; + } else { + @fetch = map { ($_) x 2 } @calls; + @store = @calls; + } is $@, "ok\n", 'stash: function calls compiled fine'; is_deeply \%mg, { - fetch => \@calls, - store => ("$]" < 5.011_002 ? \@calls : [ map { ($_) x 2 } @calls ]), + fetch => \@fetch, + store => \@store, }, 'stash: function calls'; }