}
use CGI qw( -no_xhtml);
+use Config::Std;
use DateTime;
+use Encode;
use English qw(-no_match_vars);
use SL::Auth;
use SL::LXDebug;
$::form = undef;
%::myconfig = ();
%::called_subs = (); # currently used for recursion detection
+
+ read_config 'config/lx_office.conf' => %::lx_office_conf if -f "config/lx_office.conf";
+ _decode_recursively(\%::lx_office_conf);
}
$SIG{__WARN__} = sub {
return $self->{interface} =~ m/f(?:ast)cgi/i ? $self->{request}->GetHandles() : (\*STDIN, \*STDOUT, \*STDERR);
}
+sub _decode_recursively {
+ my ($obj) = @_;
+
+ while (my ($key, $value) = each %{ $obj }) {
+ if (ref($value) eq 'HASH') {
+ _decode_recursively($value);
+ } else {
+ $obj->{$key} = decode('UTF-8', $value);
+ }
+ }
+}
+
package main;
use strict;