Serializer(3) User Contributed Perl Documentation Serializer(3) NNAAMMEE Catalyst::View::REST::Data::Serializer - Data::Serializer View Class SSYYNNOOPPSSIISS # lib/MyApp/View/REST.pm package MyApp::View::REST; use base 'Catalyst::View::REST::Data::Serializer'; 1; $c->forward('MyApp::View::REST'); DDEESSCCRRIIPPTTIIOONN This is the "Data::Serializer" view class. It can be used to use any number of Serialization methods (YAML, Storable, Data::Dumper) to implement a REST view. It also supports optional compression, encryp- tion, and a host of other useful goodies. CCOONNFFIIGGUURRAATTIIOONN OOPPTTIIOONNSS Any of the options you can pass to Data::Serializer you can put into $c->config->{'serializer'}, and have them passed on to it. If you don't pass any options, the following are used: serializer => 'Data::Dumper', digester => 'SHA1', cipher => 'Blowfish', secret => undef, portable => '1', compress => '0', serializer_token => '1', options => {}, They are the same as the Data::Serializer defaults. The only addi- tional option is: _a_s_t_e_x_t Setting this to a true value will allow you to pass the "astext=1" param to any request processed by this View. The results will be the contents of $c->stash passed through Data::Dumper, as opposed to your Serialized object. This should be turned off in production environments concerned about security. It's great for debugging, though! OOVVEERRLLOOAADDEEDD MMEETTHHOODDSS _p_r_o_c_e_s_s Serializes $c->stash to $c->response->output. If you pass "astext=1" as a param, and the $c->config->{'serializer'}->{'astext'} option is true, then it will return the output of the stash via Data::Dumper. SSEEEE AALLSSOO Catalyst, Data::Serializer AAUUTTHHOORR Adam Jacob, "adam@stalecoffee.org" CCOOPPYYRRIIGGHHTT This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.6 2005-09-13 Serializer(3)