[Rt-devel] [patch] RT 3.8 bug when using Fcntl perl module

Ivan Kohler ivan-rt-devel at 420.am
Mon Feb 8 22:47:04 EST 2010


Hi,

I find myself having recently encountered the bug indicated here:

  http://lists.fsck.com/pipermail/rt-users/2009-September/061167.html

(including "use Fcntl;" in a script which uses the RT libraries 
and attempts to LoadConfig() and Init() causes io error out with an 
error: "Couldn't load RT config file RT_SiteConfig.pm: Not a SCALAR 
reference")

The following patch to lib/RT/Config.pm should fix the problem and allow 
use of RT libraries while Fcntl (and probably other similar modules 
which export symbols) are loaded concurrently:

@@ -821,7 +821,7 @@
             # 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';
+            next if ref($entry) eq 'SCALAR' || ref($entry) eq 'REF';
             my $entry_ref = *{$entry}{ ref($ref) };
             next unless $entry_ref;


Just another happy RT user (and embedder),

-- 
Ivan Kohler
CTO and Head Geek, Freeside Internet Services, Inc.  http://freeside.biz/
Open-source billing, ticketing and provisioning
for ISPs, VoIP providers and online businesses


More information about the Rt-devel mailing list