8 if (eval 'use B::Deparse; 1') {
11 plan skip_all => 'B::Deparse is not available';
14 my $bd = B::Deparse->new;
17 no autovivification qw/fetch strict/;
19 sub blech { my $key = $_[0]->{key} }
25 like $@, qr/Reference vivification forbidden/, 'Original blech() works';
29 my $code = $bd->coderef2text(\&blech);
31 eval "$code; blech(\$undef)";
32 like $@, qr/Reference vivification forbidden/, 'Deparsed blech() works';