[Catalyst-commits] r8095 - in Catalyst-Action-REST/0.60/trunk: .
lib/Catalyst/Action lib/Catalyst/Action/Deserialize
lib/Catalyst/Action/Serialize lib/Catalyst/Controller
jshirley at dev.catalyst.perl.org
jshirley at dev.catalyst.perl.org
Wed Jul 9 19:18:00 BST 2008
Author: jshirley
Date: 2008-07-09 19:18:00 +0100 (Wed, 09 Jul 2008)
New Revision: 8095
Modified:
Catalyst-Action-REST/0.60/trunk/Changelog
Catalyst-Action-REST/0.60/trunk/Makefile.PL
Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/Deserialize/JSON.pm
Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/REST.pm
Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/Serialize/JSON.pm
Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Controller/REST.pm
Log:
Changing from JSON::Syck to JSON and JSON::XS
Modified: Catalyst-Action-REST/0.60/trunk/Changelog
===================================================================
--- Catalyst-Action-REST/0.60/trunk/Changelog 2008-07-09 16:32:34 UTC (rev 8094)
+++ Catalyst-Action-REST/0.60/trunk/Changelog 2008-07-09 18:18:00 UTC (rev 8095)
@@ -1,3 +1,7 @@
+Wed Jul 09 11:16:00 PST 2008 (jshirley) - Release 0.63
+ Changing from JSON::Syck to JSON/JSON::XS
+ Refactored tests to be more applicable to current state of affairs
+
Wed Jul 02 07:53:00 PST 2008 (jshirley) - Release 0.62
Reshipping with current Module::Install included due to error reports
about failed installs
Modified: Catalyst-Action-REST/0.60/trunk/Makefile.PL
===================================================================
--- Catalyst-Action-REST/0.60/trunk/Makefile.PL 2008-07-09 16:32:34 UTC (rev 8094)
+++ Catalyst-Action-REST/0.60/trunk/Makefile.PL 2008-07-09 18:18:00 UTC (rev 8095)
@@ -15,6 +15,11 @@
requires('URI::Find' => undef);
requires('Data::Dump' => undef);
+feature 'JSON (application/json) support',
+ -default => 0,
+ 'JSON' => undef;
+ 'JSON::XS' => undef;
+
feature 'Data::Denter (text/x-data-denter) support',
-default => 0,
'Data::Denter' => undef;
Modified: Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/Deserialize/JSON.pm
===================================================================
--- Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/Deserialize/JSON.pm 2008-07-09 16:32:34 UTC (rev 8094)
+++ Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/Deserialize/JSON.pm 2008-07-09 18:18:00 UTC (rev 8095)
@@ -11,7 +11,7 @@
use warnings;
use base 'Catalyst::Action';
-use JSON::Syck;
+use JSON qw( decode_json );
sub execute {
my $self = shift;
@@ -27,7 +27,7 @@
}
if ( $rbody ) {
- my $rdata = eval { JSON::Syck::Load( $rbody ); };
+ my $rdata = eval { decode_json( $rbody ) };
if ($@) {
return $@;
}
Modified: Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/REST.pm
===================================================================
--- Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/REST.pm 2008-07-09 16:32:34 UTC (rev 8094)
+++ Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/REST.pm 2008-07-09 18:18:00 UTC (rev 8095)
@@ -14,10 +14,12 @@
use Class::Inspector;
use Catalyst;
use Catalyst::Request::REST;
+use Catalyst::Controller::REST;
+
use 5.8.1;
our
- $VERSION = '0.62';
+ $VERSION = $Catalyst::Controller::REST::VERSION;
# This is wrong in several ways. First, there's no guarantee that
# Catalyst.pm has not been subclassed. Two, there's no guarantee that
Modified: Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/Serialize/JSON.pm
===================================================================
--- Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/Serialize/JSON.pm 2008-07-09 16:32:34 UTC (rev 8094)
+++ Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/Serialize/JSON.pm 2008-07-09 18:18:00 UTC (rev 8095)
@@ -11,7 +11,7 @@
use warnings;
use base 'Catalyst::Action';
-use JSON::Syck;
+use JSON qw(encode_json);
sub execute {
my $self = shift;
@@ -24,7 +24,7 @@
) || 'rest';
my $output;
eval {
- $output = JSON::Syck::Dump($c->stash->{$stash_key});
+ $output = encode_json( $c->stash->{$stash_key} );
};
if ($@) {
return $@;
Modified: Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Controller/REST.pm
===================================================================
--- Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Controller/REST.pm 2008-07-09 16:32:34 UTC (rev 8094)
+++ Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Controller/REST.pm 2008-07-09 18:18:00 UTC (rev 8095)
@@ -1,6 +1,6 @@
package Catalyst::Controller::REST;
-our $VERSION = 0.62;
+our $VERSION = 0.63;
=head1 NAME
More information about the Catalyst-commits
mailing list