projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
871c6f3
)
fix dependency loop problem with database config, hopefully? (Record->Msgcat->Conf...
author
ivan
<ivan>
Wed, 18 Jun 2008 00:27:44 +0000
(
00:27
+0000)
committer
ivan
<ivan>
Wed, 18 Jun 2008 00:27:44 +0000
(
00:27
+0000)
FS/FS/Msgcat.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Msgcat.pm
b/FS/FS/Msgcat.pm
index
625743d
..
7716157
100644
(file)
--- 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::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 );
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')
$conf = new FS::Conf;
$locale = $conf->config('locale') || 'en_US';
$debug = $conf->exists('show-msgcat-codes')
-};
+}
)
;
=head1 NAME
=head1 NAME