[Rt-commit] r13434 - rt/3.8/trunk/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Thu Jun 19 18:17:21 EDT 2008


Author: ruz
Date: Thu Jun 19 18:17:21 2008
New Revision: 13434

Modified:
   rt/3.8/trunk/lib/RT/Config.pm

Log:
* perl 5.10's namespace entries may have references
  to other references, skip them, those are used for
  new implementation of lightweight constants

Modified: rt/3.8/trunk/lib/RT/Config.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Config.pm	(original)
+++ rt/3.8/trunk/lib/RT/Config.pm	Thu Jun 19 18:17:21 2008
@@ -619,7 +619,7 @@
         no strict 'refs';
         my $name = undef;
 
-        # scan $pack name table(hash)
+        # scan $pack's nametable(hash)
         foreach my $k ( keys %{$pack} ) {
 
             # hash for main:: has reference on itself
@@ -639,8 +639,10 @@
             next unless $entry;
 
             # get entry for type we are looking for
-            # XXX skip scalar references. Otherwie 5.10 goes boom
-            return if ref($entry) eq 'SCALAR';  
+            # XXX skip references to scalars or other references.
+            # Otherwie 5.10 goes boom. may be we should skip any
+            # reference
+            return if ref($entry) eq 'SCALAR' || ref($entry) eq 'REF';
             my $entry_ref = *{$entry}{ ref($ref) };
             next unless $entry_ref;
 


More information about the Rt-commit mailing list