why oh why does every class have VERSION???
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / JSON / XS.pm
index 4e7ab1c..7fb0702 100644 (file)
@@ -2,16 +2,16 @@ package Catalyst::Action::Serialize::JSON::XS;
 
 use Moose;
 use namespace::autoclean;
+BEGIN {
+    $ENV{'PERL_JSON_BACKEND'} = 2; # Always use compiled JSON::XS
+}
 
 extends 'Catalyst::Action::Serialize::JSON';
-use JSON::XS qw(encode_json);
+use JSON::XS ();
 
-our $VERSION = '0.81';
+our $VERSION = '1.13';
 $VERSION = eval $VERSION;
 
-sub serialize {
-    my $self = shift;
-    encode_json( shift );
-}
+__PACKAGE__->meta->make_immutable;
 
 1;