ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/Deliantra.pm
(Generate patch)

Comparing deliantra/Deliantra/Deliantra.pm (file contents):
Revision 1.120 by root, Wed Dec 26 18:26:15 2007 UTC vs.
Revision 1.126 by root, Tue Sep 9 09:50:24 2008 UTC

4 4
5=cut 5=cut
6 6
7package Deliantra; 7package Deliantra;
8 8
9our $VERSION = '1.14'; 9our $VERSION = '1.221';
10 10
11use strict; 11use strict;
12 12
13use base 'Exporter'; 13use base 'Exporter';
14 14
24 editor_archs arch_extents 24 editor_archs arch_extents
25); 25);
26 26
27use JSON::XS qw(decode_json encode_json); 27use JSON::XS qw(decode_json encode_json);
28 28
29our $LIB = $ENV{DELIANTRA_LIBDIR} || $ENV{CROSSFIRE_LIBDIR}; 29our $LIB = $ENV{DELIANTRA_LIBDIR};
30
31our $OLDDIR = $ENV{HOME} ? "$ENV{HOME}/.crossfire"
32 : $ENV{AppData} ? "$ENV{APPDATA}/crossfire"
33 : File::Spec->tmpdir . "/crossfire";
34 30
35our $VARDIR = $ENV{HOME} ? "$ENV{HOME}/.deliantra" 31our $VARDIR = $ENV{HOME} ? "$ENV{HOME}/.deliantra"
36 : $ENV{AppData} ? "$ENV{APPDATA}/deliantra" 32 : $ENV{AppData} ? "$ENV{APPDATA}/deliantra"
37 : File::Spec->tmpdir . "/deliantra"; 33 : File::Spec->tmpdir . "/deliantra";
38 34
488} 484}
489 485
490sub attr_freeze($) { 486sub attr_freeze($) {
491 my ($ob) = @_; 487 my ($ob) = @_;
492 488
493 $ob->{attach} = Deliantra::encode_json $ob->{attach} 489 $ob->{attach} = JSON::XS->new->utf8->canonical->encode ($ob->{attach})
494 if exists $ob->{attach}; 490 if exists $ob->{attach};
495 491
496 $ob 492 $ob
497} 493}
498 494

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines