[Bast-commits] r4958 - Devel-Declare/1.000/trunk/lib/Devel

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Thu Oct 23 22:54:03 BST 2008


Author: rafl
Date: 2008-10-23 22:54:03 +0100 (Thu, 23 Oct 2008)
New Revision: 4958

Modified:
   Devel-Declare/1.000/trunk/lib/Devel/Declare.pm
Log:
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.

Modified: Devel-Declare/1.000/trunk/lib/Devel/Declare.pm
===================================================================
--- Devel-Declare/1.000/trunk/lib/Devel/Declare.pm	2008-10-23 15:00:06 UTC (rev 4957)
+++ Devel-Declare/1.000/trunk/lib/Devel/Declare.pm	2008-10-23 21:54:03 UTC (rev 4958)
@@ -97,7 +97,6 @@
   no strict 'refs';
   my ($pack, $pname) = ($name =~ m/(.+)::([^:]+)/);
   push(@$temp_save, $pack->can($pname));
-  delete ${"${pack}::"}{$pname};
   no warnings 'redefine';
   no warnings 'prototype';
   *{$name} = $cr;




More information about the Bast-commits mailing list