summary refs log tree commit diff
path: root/lib/MooseX/Net/API/Role/Serialization.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MooseX/Net/API/Role/Serialization.pm')
-rw-r--r--lib/MooseX/Net/API/Role/Serialization.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/MooseX/Net/API/Role/Serialization.pm b/lib/MooseX/Net/API/Role/Serialization.pm
index 1a090d1..fe86b9f 100644
--- a/lib/MooseX/Net/API/Role/Serialization.pm
+++ b/lib/MooseX/Net/API/Role/Serialization.pm
@@ -55,7 +55,8 @@ sub deserialize {
 
 sub serialize {
     my ($self, $content) = @_;
-    my $s = $self->_get_serializer($self->api_format);
+    my $s = $self->_get_serializer($self->api_format)
+      || $self->_load_serializer();
     my $result = try { $s->encode($content) };
     return $result if $result;
 }
@@ -96,3 +97,5 @@ sub _load_serializer {
 =item B<deserialize>
 
 =back
+99:	hit eof while in pod documentation (no =cut seen)
+	this can cause trouble with some pod utilities