From: Vincent Pit Date: Wed, 7 Aug 2013 15:59:35 +0000 (-0300) Subject: Silence 'numeric' warnings in t/11-args.t for dev releases of B::Deparse X-Git-Tag: v0.06~5 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=fd202a2009e8982636cf8dcc4db9adb3f109b1d3;p=perl%2Fmodules%2FB-RecDeparse.git Silence 'numeric' warnings in t/11-args.t for dev releases of B::Deparse --- diff --git a/t/11-args.t b/t/11-args.t index 60dd70f..aaa898a 100644 --- a/t/11-args.t +++ b/t/11-args.t @@ -8,6 +8,13 @@ use Test::More tests => 4 * 4 + 4 * 2; use B::Deparse; use B::RecDeparse; +my $bd_version = $B::Deparse::VERSION; +{ + local $@; + $bd_version = eval $bd_version; + die $@ if $@; +} + sub add ($$) { $_[0] + $_[1] } sub mul { $_[0] * $_[1] } sub fma { add mul($_[0], $_[1]), $_[2] } @@ -23,7 +30,7 @@ for (@brd_args) { my $brd = B::RecDeparse->new(%$_, level => 0); my $code = $brd->coderef2text(\&wut); SKIP: { - skip 'Harmless mismatch on "use warnings" code generation with olders B::Deparse' => 1 if $B::Deparse::VERSION < 0.71; + skip 'Harmless mismatch on "use warnings" code generation with olders B::Deparse' => 1 if $bd_version < 0.71; is($code, $reference, "empty deparse and level 0 does the same thing as B::Deparse ($i)"); } $code = eval 'sub ' . $code;