Skip to content

Commit

Permalink
Fixed module name.
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldaemon committed Mar 5, 2010
1 parent 40ea833 commit e2522ca
Show file tree
Hide file tree
Showing 21 changed files with 60 additions and 55 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Revision history for Perl extension RabbitFoot

1.00 Fri Mar 5 11:30:00 2010
- fix module name.

0.01 Sun Dec 6 20:54:03 2009
- original version
4 changes: 2 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use inc::Module::Install;
name 'RabbitFoot';
all_from 'lib/RabbitFoot.pm';
name 'Net-RabbitFoot';
all_from 'lib/Net/RabbitFoot.pm';

requires 'Moose';
requires 'MooseX::AttributeHelpers';
Expand Down
12 changes: 6 additions & 6 deletions README
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
This is Perl module RabbitFoot.
This is Perl module Net::RabbitFoot.

RabbitFoot is an AMQP(Advanced Message Queuing Protocol) client library, that is intended to allow you to interact with AMQP-compliant message brokers/servers such as RabbitMQ in an asynchronous fashion.
Net::RabbitFoot is an AMQP(Advanced Message Queuing Protocol) client library, that is intended to allow you to interact with AMQP-compliant message brokers/servers such as RabbitMQ in an asynchronous fashion.

You can use RabbitFoot to -
You can use Net::RabbitFoot to -

* Declare and delete exchanges
* Declare, delete, bind and unbind queues
* Set QoS
* Publish, consume, get, ack and recover messages
* Select, commit and rollback transactions

RabbitFoot is known to work with RabbitMQ versions 1.7.2 and version 0-8 of the AMQP specification.
Net::RabbitFoot is known to work with RabbitMQ versions 1.7.2 and version 0-8 of the AMQP specification.

INSTALLATION

Expand All @@ -25,9 +25,9 @@ Then install it:

DOCUMENTATION

RabbitFoot documentation is available as in POD. So you can do:
Net::RabbitFoot documentation is available as in POD. So you can do:

% perldoc RabbitFoot
% perldoc Net::RabbitFoot

to read the documentation online with your favorite pager.

Expand Down
20 changes: 11 additions & 9 deletions lib/RabbitFoot.pm → lib/Net/RabbitFoot.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package RabbitFoot;
package Net::RabbitFoot;

use strict;
use warnings;
Expand All @@ -9,7 +9,7 @@ use Coro::AnyEvent;

use File::ShareDir ();

use RabbitFoot::Channel;
use Net::RabbitFoot::Channel;

our $VERSION = '1.00';

Expand Down Expand Up @@ -44,7 +44,9 @@ sub default_amqp_spec {

sub open_channel {
my $self = shift;
return RabbitFoot::Channel->new(arc => $self->_do('open_channel', @_,));
return Net::RabbitFoot::Channel->new(
arc => $self->_do('open_channel', @_,)
);
}

sub _do {
Expand All @@ -67,13 +69,13 @@ __END__
=head1 NAME
RabbitFoot - An Asynchronous and multi channel Perl AMQP client.
Net::RabbitFoot - An Asynchronous and multi channel Perl AMQP client.
=head1 SYNOPSIS
use RabbitFoot;
use Net::RabbitFoot;
my $rf = RabbitFoot->new()->load_xml_spec(
my $rf = Net::RabbitFoot->new()->load_xml_spec(
'/path/to/amqp0-8.xml',
)->connect(
host => 'localhosti',
Expand All @@ -89,17 +91,17 @@ RabbitFoot - An Asynchronous and multi channel Perl AMQP client.
=head1 DESCRIPTION
RabbitFoot is an AMQP(Advanced Message Queuing Protocol) client library, that is intended to allow you to interact with AMQP-compliant message brokers/servers such as RabbitMQ in an asynchronous fashion.
Net::RabbitFoot is an AMQP(Advanced Message Queuing Protocol) client library, that is intended to allow you to interact with AMQP-compliant message brokers/servers such as RabbitMQ in an asynchronous fashion.
You can use RabbitFoot to -
You can use Net::RabbitFoot to -
* Declare and delete exchanges
* Declare, delete, bind and unbind queues
* Set QoS
* Publish, consume, get, ack and recover messages
* Select, commit and rollback transactions
RabbitFoot is known to work with RabbitMQ versions 1.7.2 and version 0-8 of the AMQP specification.
Net::RabbitFoot is known to work with RabbitMQ versions 1.7.2 and version 0-8 of the AMQP specification.
=head1 AUTHOR
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package RabbitFoot::Channel;
package Net::RabbitFoot::Channel;

use strict;
use warnings;
Expand Down
2 changes: 1 addition & 1 deletion lib/RabbitFoot/Cmd.pm → lib/Net/RabbitFoot/Cmd.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package RabbitFoot::Cmd;
package Net::RabbitFoot::Cmd;

use Moose;
extends qw(MooseX::App::Cmd);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package RabbitFoot::Cmd::Command::bind_queue;
package Net::RabbitFoot::Cmd::Command::bind_queue;

use Moose;
extends qw(MooseX::App::Cmd::Command);
with qw(RabbitFoot::Cmd::Role::Config RabbitFoot::Cmd::Role::Command);
with qw(Net::RabbitFoot::Cmd::Role::Config Net::RabbitFoot::Cmd::Role::Command);

has queue => (
isa => 'Str',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package RabbitFoot::Cmd::Command::declare_exchange;
package Net::RabbitFoot::Cmd::Command::declare_exchange;

use List::MoreUtils qw(none);
use Moose;

extends qw(MooseX::App::Cmd::Command);
with qw(RabbitFoot::Cmd::Role::Config RabbitFoot::Cmd::Role::Command);
with qw(Net::RabbitFoot::Cmd::Role::Config Net::RabbitFoot::Cmd::Role::Command);

has exchange => (
isa => 'Str',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package RabbitFoot::Cmd::Command::declare_queue;
package Net::RabbitFoot::Cmd::Command::declare_queue;

use Moose;
extends qw(MooseX::App::Cmd::Command);
with qw(RabbitFoot::Cmd::Role::Config RabbitFoot::Cmd::Role::Command);
with qw(Net::RabbitFoot::Cmd::Role::Config Net::RabbitFoot::Cmd::Role::Command);

has queue => (
isa => 'Str',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package RabbitFoot::Cmd::Command::delete_exchange;
package Net::RabbitFoot::Cmd::Command::delete_exchange;

use Moose;
extends qw(MooseX::App::Cmd::Command);
with qw(RabbitFoot::Cmd::Role::Config RabbitFoot::Cmd::Role::Command);
with qw(Net::RabbitFoot::Cmd::Role::Config Net::RabbitFoot::Cmd::Role::Command);

has exchange => (
isa => 'Str',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package RabbitFoot::Cmd::Command::purge_queue;
package Net::RabbitFoot::Cmd::Command::purge_queue;

use Moose;
extends qw(MooseX::App::Cmd::Command);
with qw(RabbitFoot::Cmd::Role::Config RabbitFoot::Cmd::Role::Command);
with qw(Net::RabbitFoot::Cmd::Role::Config Net::RabbitFoot::Cmd::Role::Command);

has queue => (
isa => 'Str',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package RabbitFoot::Cmd::Command::unbind_queue;
package Net::RabbitFoot::Cmd::Command::unbind_queue;

use Moose;
extends qw(MooseX::App::Cmd::Command);
with qw(RabbitFoot::Cmd::Role::Config RabbitFoot::Cmd::Role::Command);
with qw(Net::RabbitFoot::Cmd::Role::Config Net::RabbitFoot::Cmd::Role::Command);

has queue => (
isa => 'Str',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package RabbitFoot::Cmd::Role::Command;
package Net::RabbitFoot::Cmd::Role::Command;

use FindBin;
use Coro;
use RabbitFoot;
use Net::RabbitFoot;

use Moose::Role;
requires qw(_run);

has spec => (
isa => 'Str',
is => 'rw',
default => RabbitFoot::default_amqp_spec(),
default => Net::RabbitFoot::default_amqp_spec(),
metaclass => 'MooseX::Getopt::Meta::Attribute',
cmd_aliases => 's',
documentation => 'AMQP specification',
Expand Down Expand Up @@ -115,7 +115,7 @@ sub execute {
my $self = shift;
my ($opt, $args,) = @_;

my $rf = RabbitFoot->new(
my $rf = Net::RabbitFoot->new(
verbose => $self->verbose,
)->load_xml_spec(
$self->spec,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package RabbitFoot::Cmd::Role::Config;
package Net::RabbitFoot::Cmd::Role::Config;

use FindBin;
use Config::Any;
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions rabbit_foot
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use strict;
use warnings;

use RabbitFoot::Cmd;
use Net::RabbitFoot::Cmd;

RabbitFoot::Cmd->run;
Net::RabbitFoot::Cmd->run;

16 changes: 8 additions & 8 deletions t/00_compile.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use strict;
use Test::More tests => 11;

BEGIN {
use_ok 'RabbitFoot';
use_ok 'RabbitFoot::Cmd';
use_ok 'RabbitFoot::Cmd::Role::Command';
use_ok 'RabbitFoot::Cmd::Role::Config';
use_ok 'RabbitFoot::Cmd::Command::declare_queue';
use_ok 'RabbitFoot::Cmd::Command::bind_queue';
use_ok 'RabbitFoot::Cmd::Command::purge_queue';
use_ok 'RabbitFoot::Cmd::Command::declare_exchange';
use_ok 'Net::RabbitFoot';
use_ok 'Net::RabbitFoot::Cmd';
use_ok 'Net::RabbitFoot::Cmd::Role::Command';
use_ok 'Net::RabbitFoot::Cmd::Role::Config';
use_ok 'Net::RabbitFoot::Cmd::Command::declare_queue';
use_ok 'Net::RabbitFoot::Cmd::Command::bind_queue';
use_ok 'Net::RabbitFoot::Cmd::Command::purge_queue';
use_ok 'Net::RabbitFoot::Cmd::Command::declare_exchange';

use_ok 'AnyEvent::RabbitMQ';
use_ok 'AnyEvent::RabbitMQ::Channel';
Expand Down
4 changes: 2 additions & 2 deletions xt/04_anyevent.t
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ plan skip_all => 'Connection failure: '
. $conf->{host} . ':' . $conf->{port} if $@;
plan tests => 24;

use RabbitFoot ();
use Net::RabbitFoot ();
use AnyEvent::RabbitMQ;

my $ar = AnyEvent::RabbitMQ->new();

lives_ok sub {
$ar->load_xml_spec(RabbitFoot::default_amqp_spec())
$ar->load_xml_spec(Net::RabbitFoot::default_amqp_spec())
}, 'load xml spec';

my $done = AnyEvent->condvar;
Expand Down
6 changes: 3 additions & 3 deletions xt/05_coro.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ plan skip_all => 'Connection failure: '
plan tests => 23;

use Coro;
use RabbitFoot;
use Net::RabbitFoot;

my $rf = RabbitFoot->new();
my $rf = Net::RabbitFoot->new();

lives_ok sub {
$rf->load_xml_spec(RabbitFoot::default_amqp_spec())
$rf->load_xml_spec(Net::RabbitFoot::default_amqp_spec())
}, 'load xml spec';

lives_ok sub {
Expand Down
8 changes: 4 additions & 4 deletions xt/06_multi_channel.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ plan skip_all => 'Connection failure: '
plan tests => 6;

use Coro;
use RabbitFoot;
use Net::RabbitFoot;

my $rf = RabbitFoot->new()->load_xml_spec(
RabbitFoot::default_amqp_spec()
my $rf = Net::RabbitFoot->new()->load_xml_spec(
Net::RabbitFoot::default_amqp_spec()
)->connect(
(map {$_ => $conf->{$_}} qw(host port user pass vhost)),
timeout => 1,
Expand All @@ -43,7 +43,7 @@ my $done = 0;
my @queues = map {
my $queue = 'test_q' . $_;
my $ch = $rf->open_channel();
isa_ok($ch, 'RabbitFoot::Channel');
isa_ok($ch, 'Net::RabbitFoot::Channel');

$ch->declare_queue(queue => $queue);

Expand Down

0 comments on commit e2522ca

Please sign in to comment.