X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMsgcat.pm;h=70933b23812894c0be33eed453e54824f5a2f461;hb=f9a181e4c2e505df84de16190ee3b75011326f3f;hp=625743dc074e4115da6ea4c27124a2c40c8d2dbe;hpb=0ebeec96313dd7edfca340f01f8fbbbac1f4aa1d;p=freeside.git 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