[libanyevent-rabbitmq-perl] 40/151: Revert "Hacky hacky way to get my own on_failure callback called when everything shits itself.."

Damyan Ivanov dmn at moszumanska.debian.org
Thu Jan 16 11:03:02 UTC 2014


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

dmn pushed a commit to annotated tag debian/1.12-1
in repository libanyevent-rabbitmq-perl.

commit 694482c407f12463f6aad7ffcd323d159a9d1ade
Author: Tomas Doran (t0m) <t0m at state51.co.uk>
Date:   Wed Mar 10 17:12:40 2010 +0000

    Revert "Hacky hacky way to get my own on_failure callback called when everything shits itself.."
    
    This reverts commit b1313b01df306c57c11cc6c1c5bc954f97c7d7e6.
---
 lib/Net/RabbitFoot.pm | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/lib/Net/RabbitFoot.pm b/lib/Net/RabbitFoot.pm
index f6d8ccc..0697277 100644
--- a/lib/Net/RabbitFoot.pm
+++ b/lib/Net/RabbitFoot.pm
@@ -55,13 +55,8 @@ sub _do {
     my %args   = @_;
 
     my $cb = Coro::rouse_cb;
-    $args{on_success} = sub {$cb->(1, @_);};
-
-    my $on_failure = sub {$cb->(0, @_);};
-    if (my $previous_cb = $args{on_failure}) {
-        $on_failure = sub { $cb->(0, @_); goto $previous_cb };
-    }
-    $args{on_failure} = $on_failure,
+    $args{on_success} = sub {$cb->(1, @_);},
+    $args{on_failure} = sub {$cb->(0, @_);},
 
     $self->{_ar}->$method(%args);
     my ($is_success, @responses) = Coro::rouse_wait;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libanyevent-rabbitmq-perl.git



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