5 BEGIN { use_ok('B::Hooks::EndOfScope::WithFallback') }
8 ok(exists &on_scope_end, 'on_scope_end imported');
9 is(prototype('on_scope_end'), '&', '.. and has the right prototype');
18 on_scope_end { $called = 1; $i = 42 };
19 on_scope_end { $i = 1 };
22 is($i, 1, 'value still set at runtime');
26 ok($called, 'first callback invoked');
27 is($i, 1, '.. but the second is invoked later')