[libanyevent-rabbitmq-perl] 29/151: JSON::Syck to JSON::XS
Damyan Ivanov
dmn at moszumanska.debian.org
Thu Jan 16 11:03:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
dmn pushed a commit to annotated tag debian/1.12-1
in repository libanyevent-rabbitmq-perl.
commit 92343b4f322a5f62efe78ea937f5e7a2f710cadf
Author: cooldaemon <cooldaemon at gmail.com>
Date: Thu Feb 25 00:39:47 2010 +0900
JSON::Syck to JSON::XS
---
Makefile.PL | 2 +-
config.json | 10 +++++-----
xt/04_anyevent.t | 8 ++++++--
xt/05_coro.t | 8 ++++++--
xt/06_multi_channel.t | 8 ++++++--
5 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index 36a43df..80e96be 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -7,7 +7,7 @@ requires 'MooseX::AttributeHelpers';
requires 'MooseX::App::Cmd';
requires 'MooseX::ConfigFromFile';
requires 'Config::Any';
-requires 'JSON::Syck' => '0.88';
+requires 'JSON::XS';
requires 'List::MoreUtils';
requires 'Net::AMQP';
requires 'AnyEvent';
diff --git a/config.json b/config.json
index 14d8f02..e0eff48 100644
--- a/config.json
+++ b/config.json
@@ -1,7 +1,7 @@
{
- host: 'localhost',
- port: '5672',
- user: 'guest',
- pass: 'guest',
- vhost: '/'
+ "host": "localhost",
+ "port": 5672,
+ "user": "guest",
+ "pass": "guest",
+ "vhost": "/"
}
diff --git a/xt/04_anyevent.t b/xt/04_anyevent.t
index 21f8c45..9106429 100644
--- a/xt/04_anyevent.t
+++ b/xt/04_anyevent.t
@@ -2,9 +2,13 @@ use Test::More;
use Test::Exception;
use FindBin;
-use JSON::Syck;
+use JSON::XS;
-my $conf = JSON::Syck::LoadFile($FindBin::Bin . '/../config.json');
+my $json_text;
+open my $fh, '<', $FindBin::Bin . '/../config.json' or die $!;
+{undef $/; $json_text = <$fh>;}
+close $fh;
+my $conf = decode_json($json_text);
eval {
use IO::Socket::INET;
diff --git a/xt/05_coro.t b/xt/05_coro.t
index e2a86cc..682ec8d 100644
--- a/xt/05_coro.t
+++ b/xt/05_coro.t
@@ -2,9 +2,13 @@ use Test::More;
use Test::Exception;
use FindBin;
-use JSON::Syck;
+use JSON::XS;
-my $conf = JSON::Syck::LoadFile($FindBin::Bin . '/../config.json');
+my $json_text;
+open my $fh, '<', $FindBin::Bin . '/../config.json' or die $!;
+{undef $/; $json_text = <$fh>;}
+close $fh;
+my $conf = decode_json($json_text);
eval {
use IO::Socket::INET;
diff --git a/xt/06_multi_channel.t b/xt/06_multi_channel.t
index cab40c3..d0780dd 100644
--- a/xt/06_multi_channel.t
+++ b/xt/06_multi_channel.t
@@ -2,9 +2,13 @@ use Test::More;
use Test::Exception;
use FindBin;
-use JSON::Syck;
+use JSON::XS;
-my $conf = JSON::Syck::LoadFile($FindBin::Bin . '/../config.json');
+my $json_text;
+open my $fh, '<', $FindBin::Bin . '/../config.json' or die $!;
+{undef $/; $json_text = <$fh>;}
+close $fh;
+my $conf = decode_json($json_text);
eval {
use IO::Socket::INET;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libanyevent-rabbitmq-perl.git
More information about the Pkg-perl-cvs-commits
mailing list