[freeside-commits] freeside/FS/FS Msgcat.pm,1.1,1.2

Ivan,,, ivan at wavetail.420.am
Tue Jun 17 17:27:46 PDT 2008


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6333

Modified Files:
	Msgcat.pm 
Log Message:
fix dependency loop problem with database config, hopefully?  (Record->Msgcat->Conf->Record)

Index: Msgcat.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Msgcat.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Msgcat.pm	12 Apr 2002 13:22:02 -0000	1.1
+++ Msgcat.pm	18 Jun 2008 00:27:44 -0000	1.2
@@ -6,17 +6,19 @@
 use FS::UID;
 #use FS::Record qw( qsearchs ); # wtf?  won't import...
 use FS::Record;
-use FS::Conf;
+#use FS::Conf; #wtf?  causes dependency loops too.
 use FS::msgcat;
 
 @ISA = qw(Exporter);
 @EXPORT_OK = qw( gettext geterror );
 
-$FS::UID::callback{'Msgcat'} = sub {
+FS::UID->install_callback( sub {
+  eval { use FS::Conf; };
+  die $@ if $@;
   $conf = new FS::Conf;
   $locale = $conf->config('locale') || 'en_US';
   $debug = $conf->exists('show-msgcat-codes')
-};
+});
 
 =head1 NAME
 



More information about the freeside-commits mailing list