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

Comparing deliantra/Deliantra-Client/DC.pm (file contents):
Revision 1.165 by root, Tue Dec 25 19:23:11 2007 UTC vs.
Revision 1.166 by root, Wed Dec 26 18:20:45 2007 UTC

160 or return; 160 or return;
161 161
162 local $/; 162 local $/;
163 my $CFG = <$fh>; 163 my $CFG = <$fh>;
164 164
165 if ($CFG =~ /^---/) { ## TODO compatibility cruft, remove
166 require YAML;
167 utf8::decode $CFG;
168 $::CFG = YAML::Load ($CFG);
169 } elsif ($CFG =~ /^\{/) {
170 $::CFG = decode_json $CFG; 165 $::CFG = decode_json $CFG;
171 } else {
172 $::CFG = eval $CFG; ## todo comaptibility cruft
173 }
174} 166}
175 167
176sub write_cfg { 168sub write_cfg {
177 my ($file) = @_; 169 my ($file) = @_;
178 170

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines