Don't delete the previous symbol table entry when shadowing subs.
authorFlorian Ragwitz <rafl@debian.org>
Thu, 23 Oct 2008 21:54:03 +0000 (21:54 +0000)
committerFlorian Ragwitz <rafl@debian.org>
Thu, 23 Oct 2008 21:54:03 +0000 (21:54 +0000)
commit252e815441bd31bc1a310337dc8177ab9ae4cd51
tree4a26baec111d03771c7007a6ba0a4136b2273afb
parent2d50b551dcaf75f6af55c5ed46701e5042d9e8bc
Don't delete the previous symbol table entry when shadowing subs.

Instead just overwrite the CODE slot within. That prevents the GV from being
freed, which totally throws off the tokenizer, that holds a pointer to the gv
already.

This makes t/method.t and others work under the debugger, although I have no
idea why it ever worked, even with the debugger disabled.
lib/Devel/Declare.pm