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] }
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;