[libanyevent-rabbitmq-perl] 27/151: Merge commit 'bobtfish/master'

Damyan Ivanov dmn at moszumanska.debian.org
Thu Jan 16 11:03:01 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 8e9310ba38e4ae7ce1117a486ecdc1a6212606be
Merge: b55556f 9e100de
Author: cooldaemon <cooldaemon at gmail.com>
Date:   Wed Feb 24 13:23:27 2010 +0900

    Merge commit 'bobtfish/master'

 Makefile.PL                                                | 4 +++-
 lib/RabbitFoot.pm                                          | 7 +++++++
 lib/RabbitFoot/Cmd/Role/Command.pm                         | 2 +-
 fixed_amqp0-8.xml => lib/auto/RabbitFoot/fixed_amqp0-8.xml | 0
 xt/04_anyevent.t                                           | 3 ++-
 xt/05_coro.t                                               | 2 +-
 xt/06_multi_channel.t                                      | 2 +-
 7 files changed, 15 insertions(+), 5 deletions(-)

diff --cc lib/RabbitFoot.pm
index 456b16a,2dbd8fa..44163ce
--- a/lib/RabbitFoot.pm
+++ b/lib/RabbitFoot.pm
@@@ -7,26 -4,40 +7,28 @@@ use AnyEvent::RabbitMQ
  use Coro;
  use Coro::AnyEvent;
  
+ use File::ShareDir ();
+ 
  use RabbitFoot::Channel;
  
 -use Moose;
 -
 -our $VERSION = '0.02';
 -
 -has verbose => (
 -    isa => 'Bool',
 -    is  => 'rw',
 -);
 -
 -has _ar => (
 -    isa     => 'AnyEvent::RabbitMQ',
 -    is      => 'ro',
 -);
 -
 -for my $method (qw(connect close)) {
 -    __PACKAGE__->meta->add_method($method, sub {
 -        my $self = shift;
 -        $self->_do($method, @_);
 -        return $self;
 -    });
 +our $VERSION = '1.00';
 +
 +BEGIN {
 +    for my $method (qw(connect close)) {
 +        no strict 'refs';
 +        *{__PACKAGE__ . '::' . $method} = sub {
 +            my $self = shift;
 +            $self->_do($method, @_);
 +            return $self;
 +        };
 +    }
  }
  
 -__PACKAGE__->meta->make_immutable;
 -no Moose;
 -
 -sub BUILD {
 -    my $self = shift;
 -    $self->{_ar} = AnyEvent::RabbitMQ->new(
 -        verbose => $self->verbose,
 -    );
 +sub new {
 +    my $class = shift;
 +    return bless {
 +        _ar => AnyEvent::RabbitMQ->new(@_),
 +    }, $class;
  }
  
  sub load_xml_spec {
@@@ -35,9 -46,14 +37,14 @@@
      return $self;
  }
  
+ sub default_amqp_spec {
+     my $dir = File::ShareDir::module_dir(__PACKAGE__);
+     return "$dir/fixed_amqp0-8.xml";
+ }
+ 
  sub open_channel {
      my $self = shift;
 -    return RabbitFoot::Channel->new(arc => $self->_do('open_channel', @_));
 +    return RabbitFoot::Channel->new(arc => $self->_do('open_channel', @_,));
  }
  
  sub _do {

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