summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-12-02 14:46:17 +0000
committerNicholas Clark <nick@ccl4.org>2008-12-02 14:46:17 +0000
commitc30d8139ead4f83c6b3d27b2eace9ff0466eaf4c (patch)
tree6ed4f1f65e4f966b84e35cfd515fb02b0d1b7a3e /pp_ctl.c
parent359d40bacc2dcec1685bd77f0ec299cc69818b79 (diff)
downloadperl-c30d8139ead4f83c6b3d27b2eace9ff0466eaf4c.tar.gz
Add two more flags, PERLDBf_SAVESRC_NOSUBS and PERLDBf_SAVESRC_INVALID,
which give total control over when source code from evals is stored. The debugger doesn't need them, but I forsee that profilers might. p4raw-id: //depot/perl@34979
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index c8d5a3ec3b..a3b0b0fb3b 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3730,9 +3730,10 @@ PP(pp_entereval)
save_lines(CopFILEAV(&PL_compiling), PL_parser->linestr);
PUTBACK;
ok = doeval(gimme, NULL, runcv, seq);
- if ((PERLDB_LINE || PERLDB_SAVESRC)
- && was != PL_breakable_sub_gen /* Some subs defined here. */
- && ok) {
+ if (ok ? (was != PL_breakable_sub_gen /* Some subs defined here. */
+ ? (PERLDB_LINE || PERLDB_SAVESRC)
+ : PERLDB_SAVESRC_NOSUBS)
+ : PERLDB_SAVESRC_INVALID) {
/* Just need to change the string in our writable scratch buffer that
will be used at scope exit to delete this eval's "file" name, to
something safe. The key names are of the form "_<(eval 1)" upwards,