X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FREST.pm;h=50e57ff746d12db2bf49034f6ba1d4d6c30e7bb5;hb=e540a1fa72e4a5425c59a9397a3353f4784d726a;hp=9ad724acadb0164a7103d4df7e4c8653e21f29aa;hpb=2f7533ed98d3c3821696968844cbe4ff12159490;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Controller/REST.pm b/lib/Catalyst/Controller/REST.pm index 9ad724a..50e57ff 100644 --- a/lib/Catalyst/Controller/REST.pm +++ b/lib/Catalyst/Controller/REST.pm @@ -1,6 +1,6 @@ package Catalyst::Controller::REST; -our $VERSION = '0.65'; +our $VERSION = '0.67'; =head1 NAME @@ -120,9 +120,11 @@ Returns YAML generated by L. This uses L and L to generate YAML with all URLs turned to hyperlinks. Only useable for Serialization. -=item C => C +=item C => C -Uses L to generate JSON output +Uses L to generate JSON output. It is strongly advised to also have +L installed. The C content type is supported but is +deprecated and you will receive warnings in your log. =item C => C @@ -215,28 +217,25 @@ use Params::Validate qw(SCALAR OBJECT); __PACKAGE__->mk_accessors(qw(serialize)); __PACKAGE__->config( - 'stash_key' => 'rest', - 'map' => { - 'text/html' => 'YAML::HTML', - 'text/xml' => 'XML::Simple', - 'text/x-yaml' => 'YAML', - 'application/json' => 'JSON', - 'text/x-json' => 'JSON', - 'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ], - 'text/x-data-denter' => [ 'Data::Serializer', 'Data::Denter' ], - 'text/x-data-taxi' => [ 'Data::Serializer', 'Data::Taxi' ], - 'application/x-storable' => [ 'Data::Serializer', 'Storable' ], - 'application/x-freezethaw' => [ 'Data::Serializer', 'FreezeThaw' ], - 'text/x-config-general' => [ 'Data::Serializer', 'Config::General' ], - 'text/x-php-serialization' => [ 'Data::Serializer', 'PHP::Serialization' ], - }, + 'default_view' => 'REST', + 'stash_key' => 'rest', + 'map' => { + 'text/html' => 'YAML::HTML', + 'text/xml' => 'XML::Simple', + 'text/x-yaml' => 'YAML', + 'application/json' => 'JSON', + 'text/x-json' => 'JSON', + 'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ], + 'text/x-data-denter' => [ 'Data::Serializer', 'Data::Denter' ], + 'text/x-data-taxi' => [ 'Data::Serializer', 'Data::Taxi' ], + 'application/x-storable' => [ 'Data::Serializer', 'Storable' ], + 'application/x-freezethaw' => [ 'Data::Serializer', 'FreezeThaw' ], + 'text/x-config-general' => [ 'Data::Serializer', 'Config::General' ], + 'text/x-php-serialization' => [ 'Data::Serializer', 'PHP::Serialization' ], + }, ); -sub begin : ActionClass('Deserialize') { -} - -sub end : ActionClass('Serialize') { -} +sub begin : ActionClass('Deserialize') { } =item status_ok @@ -461,6 +460,8 @@ and use NEXT: ... do things after Serializing ... } +=back + =head1 A MILD WARNING I have code in production using L. That said, @@ -486,6 +487,10 @@ Adam Jacob , with lots of help from mst and jrockway Marchex, Inc. paid me while I developed this module. (http://www.marchex.com) +=head1 MAINTAINER + +J. Shirley + =head1 LICENSE You may distribute this code under the same terms as Perl itself.