[libanyevent-rabbitmq-perl] 15/151: Fixed commands.

Damyan Ivanov dmn at moszumanska.debian.org
Thu Jan 16 11:03:00 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 299145b6a876c9e1fddae1c71b196fb716dc7e77
Author: cooldaemon <cooldaemon at gmail.com>
Date:   Wed Feb 10 11:50:42 2010 +0900

    Fixed commands.
---
 lib/RabbitFoot/Cmd/Command/bind_queue.pm       |  4 ++--
 lib/RabbitFoot/Cmd/Command/declare_exchange.pm |  4 ++--
 lib/RabbitFoot/Cmd/Command/declare_queue.pm    |  4 ++--
 lib/RabbitFoot/Cmd/Command/delete_exchange.pm  |  4 ++--
 lib/RabbitFoot/Cmd/Command/delete_queue.pm     |  4 ++--
 lib/RabbitFoot/Cmd/Command/purge_queue.pm      |  2 +-
 lib/RabbitFoot/Cmd/Command/unbind_queue.pm     |  4 ++--
 lib/RabbitFoot/Cmd/Role/Command.pm             | 10 +++++-----
 8 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/lib/RabbitFoot/Cmd/Command/bind_queue.pm b/lib/RabbitFoot/Cmd/Command/bind_queue.pm
index 9763832..862e8e3 100644
--- a/lib/RabbitFoot/Cmd/Command/bind_queue.pm
+++ b/lib/RabbitFoot/Cmd/Command/bind_queue.pm
@@ -62,9 +62,9 @@ sub _validate_routing_key {
 sub _run {
     my ($self, $client, $opt, $args,) = @_;
 
-    my $method_frame = $client->bind_queue({
+    my $method_frame = $client->bind_queue(
         (map {$_ => $self->$_} qw(queue exchange routing_key))
-    })->method_frame;
+    )->method_frame;
 
     print 'Bound queue to exchange', "\n";
     return;
diff --git a/lib/RabbitFoot/Cmd/Command/declare_exchange.pm b/lib/RabbitFoot/Cmd/Command/declare_exchange.pm
index 35ce128..8282826 100644
--- a/lib/RabbitFoot/Cmd/Command/declare_exchange.pm
+++ b/lib/RabbitFoot/Cmd/Command/declare_exchange.pm
@@ -86,9 +86,9 @@ sub _validate_type {
 sub _run {
     my ($self, $client, $opt, $args,) = @_;
 
-    my $method_frame = $client->declare_exchange({
+    my $method_frame = $client->declare_exchange(
         (map {$_ => $self->$_} qw(exchange type passive durable auto_delete internal))
-    })->method_frame;
+    )->method_frame;
 
     print 'Declared exchange', "\n";
     return;
diff --git a/lib/RabbitFoot/Cmd/Command/declare_queue.pm b/lib/RabbitFoot/Cmd/Command/declare_queue.pm
index 67f658e..f28c145 100644
--- a/lib/RabbitFoot/Cmd/Command/declare_queue.pm
+++ b/lib/RabbitFoot/Cmd/Command/declare_queue.pm
@@ -67,9 +67,9 @@ sub _validate_queue {
 sub _run {
     my ($self, $client, $opt, $args,) = @_;
 
-    my $method_frame = $client->declare_queue({
+    my $method_frame = $client->declare_queue(
         (map {$_ => $self->$_} qw(queue passive durable exclusive auto_delete))
-    })->method_frame;
+    )->method_frame;
 
     print 'Declared queue', "\n";
     for my $method (qw(queue message_count consumer_count)) {
diff --git a/lib/RabbitFoot/Cmd/Command/delete_exchange.pm b/lib/RabbitFoot/Cmd/Command/delete_exchange.pm
index f2143fb..81fcbb5 100644
--- a/lib/RabbitFoot/Cmd/Command/delete_exchange.pm
+++ b/lib/RabbitFoot/Cmd/Command/delete_exchange.pm
@@ -39,9 +39,9 @@ sub _validate_exchange {
 sub _run {
     my ($self, $client, $opt, $args,) = @_;
 
-    my $method_frame = $client->delete_exchange({
+    my $method_frame = $client->delete_exchange(
         (map {$_ => $self->$_} qw(exchange if_unused))
-    })->method_frame;
+    )->method_frame;
 
     print 'Deleted exchange', "\n";
     return;
diff --git a/lib/RabbitFoot/Cmd/Command/delete_queue.pm b/lib/RabbitFoot/Cmd/Command/delete_queue.pm
index 124c713..8ad6b5c 100644
--- a/lib/RabbitFoot/Cmd/Command/delete_queue.pm
+++ b/lib/RabbitFoot/Cmd/Command/delete_queue.pm
@@ -48,9 +48,9 @@ sub _validate_queue {
 sub _run {
     my ($self, $client, $opt, $args,) = @_;
 
-    my $method_frame = $client->delete_queue({
+    my $method_frame = $client->delete_queue(
         (map {$_ => $self->$_} qw(queue if_unused if_empty))
-    })->method_frame;
+    )->method_frame;
 
     print 'Deleted queue', "\n";
     print 'message_count: ', $method_frame->message_count, "\n";
diff --git a/lib/RabbitFoot/Cmd/Command/purge_queue.pm b/lib/RabbitFoot/Cmd/Command/purge_queue.pm
index e681399..d6c2997 100644
--- a/lib/RabbitFoot/Cmd/Command/purge_queue.pm
+++ b/lib/RabbitFoot/Cmd/Command/purge_queue.pm
@@ -30,7 +30,7 @@ sub _validate_queue {
 sub _run {
     my ($self, $client, $opt, $args,) = @_;
 
-    my $method_frame = $client->purge_queue({queue => $self->queue})->method_frame;
+    my $method_frame = $client->purge_queue(queue => $self->queue)->method_frame;
 
     print 'Purged queue', "\n";
     print 'message_count: ', $method_frame->message_count, "\n";
diff --git a/lib/RabbitFoot/Cmd/Command/unbind_queue.pm b/lib/RabbitFoot/Cmd/Command/unbind_queue.pm
index bc9f5ab..cda1414 100644
--- a/lib/RabbitFoot/Cmd/Command/unbind_queue.pm
+++ b/lib/RabbitFoot/Cmd/Command/unbind_queue.pm
@@ -62,9 +62,9 @@ sub _validate_routing_key {
 sub _run {
     my ($self, $client, $opt, $args,) = @_;
 
-    my $method_frame = $client->unbind_queue({
+    my $method_frame = $client->unbind_queue(
         (map {$_ => $self->$_} qw(queue exchange routing_key))
-    })->method_frame;
+    )->method_frame;
 
     print 'Unbound queue to exchange', "\n";
     return;
diff --git a/lib/RabbitFoot/Cmd/Role/Command.pm b/lib/RabbitFoot/Cmd/Role/Command.pm
index b9132d3..b01190c 100644
--- a/lib/RabbitFoot/Cmd/Role/Command.pm
+++ b/lib/RabbitFoot/Cmd/Role/Command.pm
@@ -114,16 +114,16 @@ sub execute {
     my $self = shift;
     my ($opt, $args,) = @_;
 
-    my $client = RabbitFoot->new({
+    my $ch = RabbitFoot->new(
         verbose => $self->verbose,
         timeout => 1,
-    })->load_xml_spec(
+    )->load_xml_spec(
         $self->spec,
-    )->connect({
+    )->connect(
         (map {$_ => $self->$_} qw(host port user pass vhost))
-    });
+    )->open_channel();
 
-    $self->_run($client, @_,);
+    $self->_run($ch, @_,);
     return;
 }
 

-- 
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