X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FDeserialize%2FData%2FSerializer.pm;h=bd87c2e4d29278e3903a6df79a09fa7dec5e7e0c;hb=f465980c3c25b475d878716b7341d0a4f5c8f823;hp=7044655db37dcdb19f76843d368556f8ff4f8ac0;hpb=e601addaf89882fccbc824c1a53328f0d049b32b;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/Deserialize/Data/Serializer.pm b/lib/Catalyst/Action/Deserialize/Data/Serializer.pm index 7044655..bd87c2e 100644 --- a/lib/Catalyst/Action/Deserialize/Data/Serializer.pm +++ b/lib/Catalyst/Action/Deserialize/Data/Serializer.pm @@ -1,18 +1,14 @@ -# -# Catalyst::Action::Deserialize::Data::Serializer.pm -# Created by: Adam Jacob, Marchex, -# Created on: 10/12/2006 03:00:32 PM PDT -# -# $Id$ - package Catalyst::Action::Deserialize::Data::Serializer; -use strict; -use warnings; +use Moose; +use namespace::autoclean; -use base 'Catalyst::Action'; +extends 'Catalyst::Action'; use Data::Serializer; +our $VERSION = '0.81'; +$VERSION = eval $VERSION; + sub execute { my $self = shift; my ( $controller, $c, $serializer ) = @_; @@ -24,7 +20,8 @@ sub execute { require $sp }; if ($@) { - $c->log->debug("Could not load $serializer, refusing to serialize: $@"); + $c->log->debug("Could not load $serializer, refusing to serialize: $@") + if $c->debug; return 0; } my $body = $c->request->body; @@ -48,7 +45,8 @@ sub execute { $c->request->data($rdata); } else { $c->log->debug( - 'I would have deserialized, but there was nothing in the body!'); + 'I would have deserialized, but there was nothing in the body!') + if $c->debug; } return 1; }