ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/utils/cfutil.in
(Generate patch)

Comparing deliantra/server/utils/cfutil.in (file contents):
Revision 1.71 by root, Sat Feb 7 21:40:54 2009 UTC vs.
Revision 1.72 by root, Mon Oct 12 14:01:00 2009 UTC

14my $PNGNQ = "@PNGNQ@"; 14my $PNGNQ = "@PNGNQ@";
15 15
16use Getopt::Long; 16use Getopt::Long;
17use Coro::EV; 17use Coro::EV;
18use AnyEvent; 18use AnyEvent;
19use YAML (); 19use YAML::XS ();
20use JSON::XS (); 20use JSON::XS ();
21use IO::AIO (); 21use IO::AIO ();
22use File::Temp; 22use File::Temp;
23use Deliantra; 23use Deliantra;
24use Coro 5.12; 24use Coro 5.12;
534 534
535 substr $dir, 0, 1 + length $PATH, ""; 535 substr $dir, 0, 1 + length $PATH, "";
536 536
537 if (my $filter = $meta->{cfutil_filter}) { 537 if (my $filter = $meta->{cfutil_filter}) {
538 if ($filter eq "yaml2json") { 538 if ($filter eq "yaml2json") {
539 $data = JSON::XS::encode_json YAML::Load $data; 539 $data = JSON::XS::encode_json YAML::XS::Load $data;
540 } elsif ($filter eq "json2json") { 540 } elsif ($filter eq "json2json") {
541 $data = JSON::XS::encode_json JSON::XS->relaxed->utf8->decode ($data); 541 $data = JSON::XS::encode_json JSON::XS->relaxed->utf8->decode ($data);
542 } elsif ($filter eq "perl2json") { 542 } elsif ($filter eq "perl2json") {
543 $data = eval $data; die if $@; 543 $data = eval $data; die if $@;
544 $data = JSON::XS::encode_json $data; 544 $data = JSON::XS::encode_json $data;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines