[SCM] libmessage-passing-perl Debian packaging branch, master, updated. debian/0.111-3-14-g44f6e88

Tomas Doran bobtfish at bobtfish.net
Mon May 6 11:56:53 UTC 2013


The following commit has been merged in the master branch:
commit 68225146aa4a1b3958ba435613555177aa7189da
Author: Tomas Doran <bobtfish at bobtfish.net>
Date:   Mon Apr 23 21:42:43 2012 +0100

    Support pretty printing

diff --git a/lib/Log/Stash/Role/Output.pm b/lib/Log/Stash/Role/Output.pm
index bac8011..b44e3ea 100644
--- a/lib/Log/Stash/Role/Output.pm
+++ b/lib/Log/Stash/Role/Output.pm
@@ -4,10 +4,16 @@ use JSON qw/ to_json /;
 use Scalar::Util qw/ blessed /;
 use namespace::autoclean;
 
+has pretty => (
+    isa => 'Bool',
+    default => 0,
+    is => 'ro',
+);
+
 sub encode {
     my ($self, $message) = @_;
     $message = $message->pack if blessed($message) && $message->can('pack');
-    to_json( $message, { utf8  => 1 } )
+    to_json( $message, { utf8  => 1, $self->pretty ? (pretty => 1) : () } )
 }
 
 requires 'consume';

-- 
libmessage-passing-perl Debian packaging



More information about the Pkg-perl-cvs-commits mailing list