summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-03-02 22:03:47 -0600
committerJesse Luehrs <doy@tozt.net>2011-03-02 22:03:47 -0600
commit04918f808a684de8897789f8eff80880f1e93ec9 (patch)
tree61f82e5572ff05388d847b3487171490a80ad0ba /t
parent1e39bf601a7d49cd9664e0b88d6838886f0779f9 (diff)
downloadeval-closure-04918f808a684de8897789f8eff80880f1e93ec9.tar.gz
eval-closure-04918f808a684de8897789f8eff80880f1e93ec9.zip
don't add #line description when debugger is active
this supposedly lets things like NYTProf report on time spent in evals
Diffstat (limited to 't')
-rw-r--r--t/11-debugger.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/11-debugger.t b/t/11-debugger.t
new file mode 100644
index 0000000..7b97272
--- /dev/null
+++ b/t/11-debugger.t
@@ -0,0 +1,23 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use Test::Fatal;
+
+BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE
+
+use Eval::Closure;
+
+unlike(
+ exception {
+ eval_closure(
+ source => 'sub { $bar }',
+ description => 'foo',
+ )
+ },
+ qr/#line/,
+ "#line directive isn't added when debugger is active"
+);
+
+
+done_testing;