use strict;
use warnings;
-use Test::More tests => 8 + 1;
+use Test::More tests => 10 + 1;
use Variable::Magic qw/wizard cast/;
eval "use Variable::Magic::TestScopeEnd";
like $@, qr/turnip/, 'die in BEGIN in require triggers hints hash destructor';
+
+eval q{BEGIN {
+ Variable::Magic::TestScopeEnd::hook {
+ pass 'in hints hash destructor 2';
+ };
+ die "tomato";
+}};
+
+like $@, qr/tomato/, 'die in BEGIN in eval triggers hints hash destructor';