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

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


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

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	Msgcat.pm 
Log Message:
REALLY, don't use FS::Conf from Msgcat until runtime... should hopefully FINALLY eliminate the Record->Msgcat->Conf->Record loop

Index: Msgcat.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Msgcat.pm,v
retrieving revision 1.1
retrieving revision 1.1.10.1
diff -u -d -r1.1 -r1.1.10.1
--- Msgcat.pm	12 Apr 2002 13:22:02 -0000	1.1
+++ Msgcat.pm	18 Jun 2008 00:42:39 -0000	1.1.10.1
@@ -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