summary refs log tree commit diff
path: root/lib/MooseX/Net/API/Role
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-06-17 14:20:38 +0200
committerfranck cuny <franck@lumberjaph.net>2010-06-17 14:20:38 +0200
commit0835933ed1a4a09a925cb549927b26d774e70fa4 (patch)
treee45e76c00edeb03bdc5c9da58c7a74f2b067fc8d /lib/MooseX/Net/API/Role
parentfix methods name (diff)
downloadmoosex-net-api-0835933ed1a4a09a925cb549927b26d774e70fa4.tar.gz
fix format
Diffstat (limited to '')
-rw-r--r--lib/MooseX/Net/API/Role/Format.pm4
-rw-r--r--lib/MooseX/Net/API/Role/Serialization.pm5
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/MooseX/Net/API/Role/Format.pm b/lib/MooseX/Net/API/Role/Format.pm
index abffbe6..5c37a47 100644
--- a/lib/MooseX/Net/API/Role/Format.pm
+++ b/lib/MooseX/Net/API/Role/Format.pm
@@ -35,8 +35,8 @@ has api_format_mode => (
     lazy    => 1,
     default => sub {
         my $self = shift;
-        my $mode = $self->meta->get_api_option('api_format_mode');
-        $mode || 'append';
+        my $mode = $self->meta->get_api_option('api_format_mode') || 'append';
+        $mode;
     }
 );
 
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