Fix failing test. Normalize method names
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / JSON.pm
index 3b8e511..7423e9e 100644 (file)
@@ -24,7 +24,7 @@ sub execute {
         ) || 'rest';
     my $output;
     eval {
-        $output = $self->encode( $c->stash->{$stash_key} );
+        $output = $self->serialize( $c->stash->{$stash_key} );
     };
     if ($@) {
         return $@;
@@ -33,7 +33,7 @@ sub execute {
     return 1;
 }
 
-sub encode {
+sub serialize {
     my $self = shift;
     encode_json( shift );
 }