Permalink
Browse files

Failing test for using on_scope_end in blocks where a string eval is …

…going to be compiled.
  • Loading branch information...
rafl committed Jan 4, 2009
1 parent 09d0f53 commit 309f12d78c4b8c7351ba77ba0f9d2cded42cd03f
Showing with 18 additions and 0 deletions.
  1. +18 −0 t/eval.t
View
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+use B::Hooks::EndOfScope;
+
+our $called;
+
+sub foo {
+ BEGIN { on_scope_end { $called = 1 } }
+
+ # uncomment this to make the test pass
+ eval '42';
+}
+
+BEGIN {
+ ok($called, 'callback invoked');
+}

0 comments on commit 309f12d

Please sign in to comment.