From 52456d825d696b932a3edebe0da257380616046b Mon Sep 17 00:00:00 2001 From: franck cuny Date: Tue, 22 Jun 2010 18:10:39 +0200 Subject: params can be strict or no strict --- lib/MooseX/Net/API/Role/Serialization.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/MooseX/Net/API/Role') diff --git a/lib/MooseX/Net/API/Role/Serialization.pm b/lib/MooseX/Net/API/Role/Serialization.pm index fe86b9f..f10a101 100644 --- a/lib/MooseX/Net/API/Role/Serialization.pm +++ b/lib/MooseX/Net/API/Role/Serialization.pm @@ -23,6 +23,8 @@ has serializers => ( sub get_content { my ($self, $result) = @_; + return undef unless $result->content; + my $content_type = $self->api_format // $result->header('Content-Type'); $content_type =~ s/(;.+)$//; -- cgit 1.4.1