[libmessage-passing-zeromq-perl] 24/78: Remove defaults, they're just making everything non-trivial confusing

Jonas Smedegaard js at alioth.debian.org
Mon Sep 30 09:28:20 UTC 2013


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libmessage-passing-zeromq-perl.

commit f199b36b6e3dc256382ebcf63a1087447467d9af
Author: Tomas Doran <bobtfish at bobtfish.net>
Date:   Sun Mar 18 11:15:46 2012 +0000

    Remove defaults, they're just making everything non-trivial confusing
---
 lib/Log/Stash/Input/ZeroMQ.pm  |    4 ----
 lib/Log/Stash/Output/ZeroMQ.pm |    4 ----
 t/input.t                      |    1 +
 t/output.t                     |    5 ++++-
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/lib/Log/Stash/Input/ZeroMQ.pm b/lib/Log/Stash/Input/ZeroMQ.pm
index 89364a3..7d8c0f5 100644
--- a/lib/Log/Stash/Input/ZeroMQ.pm
+++ b/lib/Log/Stash/Input/ZeroMQ.pm
@@ -17,10 +17,6 @@ has '+_socket' => (
     },
 );
 
-has '+socket_bind' => (
-    default => 'tcp://*:5558',
-);
-
 sub _socket_type { 'SUB' }
 
 after setsockopt => sub {
diff --git a/lib/Log/Stash/Output/ZeroMQ.pm b/lib/Log/Stash/Output/ZeroMQ.pm
index e6dfef4..df96724 100644
--- a/lib/Log/Stash/Output/ZeroMQ.pm
+++ b/lib/Log/Stash/Output/ZeroMQ.pm
@@ -11,10 +11,6 @@ has '+_socket' => (
     },
 );
 
-has '+connect' => (
-    default => sub { 'tcp://127.0.0.1:5558' },
-);
-
 sub _socket_type { 'PUB' }
 
 after setsockopt => sub {
diff --git a/t/input.t b/t/input.t
index f16344e..87dc6bd 100644
--- a/t/input.t
+++ b/t/input.t
@@ -12,6 +12,7 @@ my $output = Log::Stash::Output::Test->new(
     on_consume_cb => sub { $cv->send },
 );
 my $input = Log::Stash::Input::ZeroMQ->new(
+    socket_bind => 'tcp://*:5558',
     output_to => $output,
 );
 ok $input;
diff --git a/t/output.t b/t/output.t
index 818b925..044452d 100644
--- a/t/output.t
+++ b/t/output.t
@@ -7,7 +7,9 @@ use Log::Stash::Input::ZeroMQ;
 use Log::Stash::Output::Test;
 use Log::Stash::Output::ZeroMQ;
 
-my $output = Log::Stash::Output::ZeroMQ->new();
+my $output = Log::Stash::Output::ZeroMQ->new(
+    connect => 'tcp://127.0.0.1:5558',
+);
 
 $output->consume({foo => 'bar'});
 
@@ -15,6 +17,7 @@ use Log::Stash::Input::ZeroMQ;
 use Log::Stash::Output::Test;
 my $cv = AnyEvent->condvar;
 my $input = Log::Stash::Input::ZeroMQ->new(
+    socket_bind => 'tcp://*:5558',
     output_to => Log::Stash::Output::Test->new(
         on_consume_cb => sub { $cv->send }
     ),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmessage-passing-zeromq-perl.git



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