diff options
author | ivan <ivan> | 2008-06-18 00:42:39 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-06-18 00:42:39 +0000 |
commit | e46cfacbda8027da57555cba882633332e1e082f (patch) | |
tree | a3209cb4753bc3b9222ed6fb681fe54d58ac8bbf | |
parent | 02aef1777c5c3cd06737ee565504a437a11eb62e (diff) |
REALLY, don't use FS::Conf from Msgcat until runtime... should hopefully FINALLY eliminate the Record->Msgcat->Conf->Record loop
-rw-r--r-- | FS/FS/Msgcat.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/FS/FS/Msgcat.pm b/FS/FS/Msgcat.pm index 625743dc0..70933b238 100644 --- a/FS/FS/Msgcat.pm +++ b/FS/FS/Msgcat.pm @@ -6,17 +6,19 @@ use Exporter; 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 |