summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2014-10-02 15:54:58 +1000
committerTony Cook <tony@develop-help.com>2014-10-09 11:24:50 +1100
commita6d695237c4c14fa287df157c4907e01d4647641 (patch)
tree77c7361b0f9c6d75fc7b703d4cc190cb16b906d3 /regen
parent2c2d7daa95190ae95ae6486d1734a1167ea05966 (diff)
downloadperl-a6d695237c4c14fa287df157c4907e01d4647641.tar.gz
[perl #122445] use magic on $DB::single etc to avoid overload issues
This prevents perl recursing infinitely when an overloaded object is assigned to $DB::single, $DB::trace or $DB::signal This is done by referencing their values as IVs instead of as SVs in dbstate, and by adding magic to those variables so that assignments to the scalars update the PL_DBcontrol array.
Diffstat (limited to 'regen')
-rw-r--r--regen/mg_vtable.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/regen/mg_vtable.pl b/regen/mg_vtable.pl
index 0bbfbfdf6d..51c130685b 100644
--- a/regen/mg_vtable.pl
+++ b/regen/mg_vtable.pl
@@ -108,6 +108,8 @@ my %mg =
ext => { char => '~', desc => 'Available for use by extensions' },
checkcall => { char => ']', value_magic => 1, vtable => 'checkcall',
desc => 'inlining/mutation of call to this CV'},
+ debugvar => { char => '*', desc => '$DB::single, signal, trace vars',
+ vtable => 'debugvar' },
);
# These have a subtly different "namespace" from the magic types.
@@ -144,6 +146,7 @@ my %sig =
'hintselem' => {set => 'sethint', clear => 'clearhint'},
'hints' => {clear => 'clearhints'},
'checkcall' => {copy => 'copycallchecker'},
+ 'debugvar' => { set => 'setdebugvar', get => 'getdebugvar' },
);
my ($vt, $raw, $names) = map {