--- deliantra/Deliantra-Client/DC.pm 2008/01/19 04:55:42 1.173 +++ deliantra/Deliantra-Client/DC.pm 2008/08/19 17:38:29 1.186 @@ -12,12 +12,14 @@ =cut +package Deliantra::Client; # work around CPAN breakage +package App::Deliantra; # try to reserve namespace package DC; use Carp (); BEGIN { - $VERSION = '0.9965'; + $VERSION = '0.9975'; use XSLoader; XSLoader::load "Deliantra::Client", $VERSION; @@ -166,13 +168,13 @@ } sub write_cfg { - my ($file) = @_; + my $file = "$Deliantra::VARDIR/client.cf"; $::CFG->{VERSION} = $::VERSION; open my $fh, ">:utf8", $file or return; - print $fh encode_json $::CFG; + print $fh JSON::XS->new->utf8->pretty->encode ($::CFG); } sub http_proxy { @@ -225,7 +227,6 @@ } else { fcntl $fh, &Fcntl::F_SETFL, $nb ? &Fcntl::O_NONBLOCK : 0; } - } package DC::Layout;