The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Changes 26
META.yml 55
Makefile.PL 11
inc/Module/Install/Base.pm 11
inc/Module/Install/Can.pm 11
inc/Module/Install/Fetch.pm 51
inc/Module/Install/Makefile.pm 22
inc/Module/Install/Metadata.pm 6937
inc/Module/Install/Share.pm 11
inc/Module/Install/Win32.pm 51
inc/Module/Install/WriteAll.pm 51
inc/Module/Install.pm 1310
lib/AnyEvent/RabbitMQ/Channel.pm 375
lib/AnyEvent/RabbitMQ.pm 14
14 files changed (This is a version diff) 114146
@@ -1,8 +1,12 @@
 Revision history for Perl extension AnyEvent::RabbitMQ
 
+1.19  Sat Mar 21 16:49:24 GMT 2015
+        - Add 'no_ack' as an optional argument to the ->consume method
+          (Dave Mueller).
+        - Fill in some missing documentation (Moritz Lenz).
 1.18  Mon Sep 29 19:36:00 PDT 2014
-       - Added the bind_exchange and unbind_exchange methods
-         for exchange-exchange bindings.
+        - Added the bind_exchange and unbind_exchange methods
+          for exchange-exchange bindings.
 
 1.17  Fri Jul 25 14:02:00 PDT 2014
         - Add support for chunking large bodies into multiple AMQP frames,
@@ -11,7 +11,7 @@ configure_requires:
   ExtUtils::MakeMaker: 6.59
 distribution_type: module
 dynamic_config: 1
-generated_by: 'Module::Install version 1.10'
+generated_by: 'Module::Install version 1.06'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -28,11 +28,11 @@ requires:
   Devel::GlobalDestruction: 0
   File::ShareDir: 0
   List::MoreUtils: 0
-  Net::AMQP: '0.06'
-  Readonly: '1.03'
+  Net::AMQP: 0.06
+  Readonly: 1.03
   namespace::clean: 0
-  perl: 5.6.0
+  perl: 5.10.0
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://github.com/bobtfish/AnyEvent-RabbitMQ.git
-version: '1.18'
+version: 1.19
@@ -15,7 +15,7 @@ tests 't/*.t';
 author_tests 'xt';
 install_share;
 
-perl_version '5.006';
+perl_version '5.10';
 build_requires 'Test::More';
 build_requires 'Test::Exception';
 build_requires 'version';
@@ -4,7 +4,7 @@ package Module::Install::Base;
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '1.10';
+	$VERSION = '1.06';
 }
 
 # Suspend handler for "redefined" warnings
@@ -8,7 +8,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.10';
+	$VERSION = '1.06';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.10';
+	$VERSION = '1.06';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -91,7 +91,3 @@ END_FTP
 }
 
 1;
-
-__END__
-
-#line 109
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.10';
+	$VERSION = '1.06';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -133,7 +133,7 @@ sub makemaker_args {
 	return $args;
 }
 
-# For mm args that take multiple space-separated args,
+# For mm args that take multiple space-seperated args,
 # append an argument to the current list.
 sub makemaker_append {
 	my $self = shift;
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.10';
+	$VERSION = '1.06';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -347,7 +347,7 @@ sub name_from {
 		^ \s*
 		package \s*
 		([\w:]+)
-		[\s|;]*
+		\s* ;
 		/ixms
 	) {
 		my ($name, $module_name) = ($1, $1);
@@ -453,40 +453,24 @@ sub author_from {
 
 #Stolen from M::B
 my %license_urls = (
+    perl         => 'http://dev.perl.org/licenses/',
+    apache       => 'http://apache.org/licenses/LICENSE-2.0',
+    apache_1_1   => 'http://apache.org/licenses/LICENSE-1.1',
+    artistic     => 'http://opensource.org/licenses/artistic-license.php',
+    artistic_2   => 'http://opensource.org/licenses/artistic-license-2.0.php',
+    lgpl         => 'http://opensource.org/licenses/lgpl-license.php',
+    lgpl2        => 'http://opensource.org/licenses/lgpl-2.1.php',
+    lgpl3        => 'http://opensource.org/licenses/lgpl-3.0.html',
+    bsd          => 'http://opensource.org/licenses/bsd-license.php',
+    gpl          => 'http://opensource.org/licenses/gpl-license.php',
+    gpl2         => 'http://opensource.org/licenses/gpl-2.0.php',
+    gpl3         => 'http://opensource.org/licenses/gpl-3.0.html',
+    mit          => 'http://opensource.org/licenses/mit-license.php',
+    mozilla      => 'http://opensource.org/licenses/mozilla1.1.php',
     open_source  => undef,
     unrestricted => undef,
     restrictive  => undef,
     unknown      => undef,
-
-## from Software-License - should we be using S-L instead ?
-# duplicates commeted out, see hack above ^^
-#	open_source  => 'http://www.gnu.org/licenses/agpl-3.0.txt',
-#	apache       => 'http://www.apache.org/licenses/LICENSE-1.1',
-	apache       => 'http://www.apache.org/licenses/LICENSE-2.0.txt',
-	artistic     => 'http://www.perlfoundation.org/artistic_license_1_0',
-	artistic_2   => 'http://www.perlfoundation.org/artistic_license_2_0',
-	bsd          => 'http://opensource.org/licenses/BSD-3-Clause',
-#	unrestricted => 'http://creativecommons.org/publicdomain/zero/1.0/',
-#	open_source  => 'http://www.freebsd.org/copyright/freebsd-license.html',
-#	open_source  => 'http://www.gnu.org/licenses/fdl-1.2.txt',
-#	open_source  => 'http://www.gnu.org/licenses/fdl-1.3.txt',
-#	gpl          => 'http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt',
-#	gpl          => 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt',
-	gpl          => 'http://www.gnu.org/licenses/gpl-3.0.txt',
-#	lgpl         => 'http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt',
-	lgpl         => 'http://www.gnu.org/licenses/lgpl-3.0.txt',
-	mit          => 'http://www.opensource.org/licenses/mit-license.php',
-#	mozilla      => 'http://www.mozilla.org/MPL/MPL-1.0.txt',
-#	mozilla      => 'http://www.mozilla.org/MPL/MPL-1.1.txt',
-	mozilla      => 'http://www.mozilla.org/MPL/2.0/index.txt',
-#	restrictive  => '',
-#	open_source  => 'http://www.openssl.org/source/license.html',
-	perl         => 'http://dev.perl.org/licenses/',
-#	open_source  => 'http://www.opensource.org/licenses/postgresql',
-#	open_source  => 'http://trolltech.com/products/qt/licenses/licensing/qpl',
-#	unrestricted => 'http://h71000.www7.hp.com/doc/83final/BA554_90007/apcs02.html',
-#	open_source  => 'http://www.openoffice.org/licenses/sissl_license.html',
-#	open_source  => 'http://www.zlib.net/zlib_license.html',
 );
 
 sub license {
@@ -527,43 +511,31 @@ sub __extract_license {
 	my @phrases      = (
 		'(?:under )?the same (?:terms|license) as (?:perl|the perl (?:\d )?programming language)' => 'perl', 1,
 		'(?:under )?the terms of (?:perl|the perl programming language) itself' => 'perl', 1,
-
-		# the following are relied on by the test system even if they are wrong :(
+		'Artistic and GPL'                   => 'perl',         1,
+		'GNU general public license'         => 'gpl',          1,
+		'GNU public license'                 => 'gpl',          1,
+		'GNU lesser general public license'  => 'lgpl',         1,
+		'GNU lesser public license'          => 'lgpl',         1,
+		'GNU library general public license' => 'lgpl',         1,
+		'GNU library public license'         => 'lgpl',         1,
+		'GNU Free Documentation license'     => 'unrestricted', 1,
+		'GNU Affero General Public License'  => 'open_source',  1,
 		'(?:Free)?BSD license'               => 'bsd',          1,
 		'Artistic license 2\.0'              => 'artistic_2',   1,
+		'Artistic license'                   => 'artistic',     1,
+		'Apache (?:Software )?license'       => 'apache',       1,
+		'GPL'                                => 'gpl',          1,
 		'LGPL'                               => 'lgpl',         1,
+		'BSD'                                => 'bsd',          1,
+		'Artistic'                           => 'artistic',     1,
 		'MIT'                                => 'mit',          1,
-
-## from Software-License
-		'The GNU Affero General Public License, Version 3, November 2007'   => 'open_source', 1,
-		'The Apache Software License, Version 1.1'                          => 'apache', 1,
-		'The Apache License, Version 2.0, January 2004'                     => 'apache', 1,
-		'The Artistic License 1.0'                                          => 'artistic', 1,
-		'The Artistic License 2.0 (GPL Compatible)'                         => 'artistic_2', 1,
-		'The (three-clause) BSD License'                                    => 'bsd', 1,
-		'CC0 License'														=> 'unrestricted', 1,		
-		'The (two-clause) FreeBSD License'                                  => 'open_source', 1,
-		'GNU Free Documentation License v1.2'                               => 'open_source', 1,
-		'GNU Free Documentation License v1.3'                               => 'open_source', 1,
-		'The GNU General Public License, Version 1, February 1989'          => 'gpl', 1,
-		'The GNU General Public License, Version 2, June 1991'              => 'gpl', 1,
-		'The GNU General Public License, Version 3, June 2007'              => 'gpl', 1,
-		'The GNU Lesser General Public License, Version 2.1, February 1999' => 'lgpl', 1,
-		'The GNU Lesser General Public License, Version 3, June 2007'       => 'lgpl', 1,
-		'The MIT (X11) License'                                             => 'mit', 1,
-		'The Mozilla Public License 1.0'                                    => 'mozilla', 1,
-		'The Mozilla Public License 1.1'                                    => 'mozilla', 1,
-		'Mozilla Public License Version 2.0'								=> 'mozilla', 1,
-		'"No License" License'												=> 'restrictive', 1,
-		'OpenSSL License'                                                   => 'open_source', 1,
-		'the same terms as the perl 5 programming language system itself'   => 'perl', 1,
-		'The PostgreSQL License'											=> 'open_source', 1,
-		'The Q Public License, Version 1.0'                                 => 'open_source', 1,
-		'Original SSLeay License'                                           => 'unrestricted', 1,
-		'Sun Internet Standards Source License (SISSL)'                     => 'open_source', 1,
-		'The zlib License'                                                  => 'open_source', 1,
+		'Mozilla Public License'             => 'mozilla',      1,
+		'Q Public License'                   => 'open_source',  1,
+		'OpenSSL License'                    => 'unrestricted', 1,
+		'SSLeay License'                     => 'unrestricted', 1,
+		'zlib License'                       => 'open_source',  1,
+		'proprietary'                        => 'proprietary',  0,
 	);
-
 	while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
 		$pattern =~ s#\s+#\\s+#gs;
 		if ( $license_text =~ /\b$pattern\b/i ) {
@@ -733,7 +705,7 @@ sub _write_mymeta_data {
 	my @yaml = Parse::CPAN::Meta::LoadFile('META.yml');
 	my $meta = $yaml[0];
 
-	# Overwrite the non-configure dependency hashes
+	# Overwrite the non-configure dependency hashs
 	delete $meta->{requires};
 	delete $meta->{build_requires};
 	delete $meta->{recommends};
@@ -748,7 +720,3 @@ sub _write_mymeta_data {
 }
 
 1;
-
-__END__
-
-#line 766
@@ -8,7 +8,7 @@ use ExtUtils::Manifest ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.10';
+	$VERSION = '1.06';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.10';
+	$VERSION = '1.06';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -62,7 +62,3 @@ END_MESSAGE
 }
 
 1;
-
-__END__
-
-#line 80
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.10';
+	$VERSION = '1.06';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }
@@ -61,7 +61,3 @@ sub WriteAll {
 }
 
 1;
-
-__END__
-
-#line 79
@@ -17,7 +17,7 @@ package Module::Install;
 #     3. The ./inc/ version of Module::Install loads
 # }
 
-use 5.006;
+use 5.005;
 use strict 'vars';
 use Cwd        ();
 use File::Find ();
@@ -31,7 +31,7 @@ BEGIN {
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '1.10';
+	$VERSION = '1.06';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -156,10 +156,10 @@ END_DIE
 sub autoload {
 	my $self = shift;
 	my $who  = $self->_caller;
-	my $cwd  = Cwd::getcwd();
+	my $cwd  = Cwd::cwd();
 	my $sym  = "${who}::AUTOLOAD";
 	$sym->{$cwd} = sub {
-		my $pwd = Cwd::getcwd();
+		my $pwd = Cwd::cwd();
 		if ( my $code = $sym->{$pwd} ) {
 			# Delegate back to parent dirs
 			goto &$code unless $cwd eq $pwd;
@@ -239,7 +239,7 @@ sub new {
 
 	# ignore the prefix on extension modules built from top level.
 	my $base_path = Cwd::abs_path($FindBin::Bin);
-	unless ( Cwd::abs_path(Cwd::getcwd()) eq $base_path ) {
+	unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) {
 		delete $args{prefix};
 	}
 	return $args{_self} if $args{_self};
@@ -338,7 +338,7 @@ sub find_extensions {
 		if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
 			my $content = Module::Install::_read($subpath . '.pm');
 			my $in_pod  = 0;
-			foreach ( split /\n/, $content ) {
+			foreach ( split //, $content ) {
 				$in_pod = 1 if /^=\w/;
 				$in_pod = 0 if /^=cut/;
 				next if ($in_pod || /^=cut/);  # skip pod text
@@ -434,7 +434,7 @@ END_OLD
 
 # _version is for processing module versions (eg, 1.03_05) not
 # Perl versions (eg, 5.8.1).
-sub _version {
+sub _version ($) {
 	my $s = shift || 0;
 	my $d =()= $s =~ /(\.)/g;
 	if ( $d >= 2 ) {
@@ -450,12 +450,12 @@ sub _version {
 	return $l + 0;
 }
 
-sub _cmp {
+sub _cmp ($$) {
 	_version($_[1]) <=> _version($_[2]);
 }
 
 # Cloned from Params::Util::_CLASS
-sub _CLASS {
+sub _CLASS ($) {
 	(
 		defined $_[0]
 		and
@@ -467,7 +467,4 @@ sub _CLASS {
 
 1;
 
-
-__END__
-
-#line 485
+# Copyright 2008 - 2012 Adam Kennedy.
@@ -541,15 +541,16 @@ sub consume {
 
     return $self if !$self->_check_open($failure_cb);
 
-    my $consumer_cb = delete $args{on_consume} || sub {};
-    my $cancel_cb   = delete $args{on_cancel} || sub {};
+    my $consumer_cb = delete $args{on_consume}  || sub {};
+    my $cancel_cb   = delete $args{on_cancel}   || sub {};
+    my $no_ack      = delete $args{no_ack}      // 1;
 
     $self->{connection}->_push_write_and_read(
         'Basic::Consume',
         {
             consumer_tag => '',
             no_local     => 0,
-            no_ack       => 1,
+            no_ack       => $no_ack,
             exclusive    => 0,
 
             %args, # queue
@@ -1015,6 +1016,11 @@ AnyEvent::RabbitMQ::Channel - Abstraction of an AMQP channel.
 
 =head1 DESCRIPTION
 
+A RabbitMQ channel.
+
+A channel is a light-weight virtual connection within a TCP connection to a
+RabbitMQ broker.
+
 =head1 ARGUMENTS FOR C<open_channel>
 
 =over
@@ -1100,6 +1106,59 @@ The routing key to bind with
 
 =head2 declare_queue
 
+Declare a queue, that is, create it if it doesn't exist yet.
+
+Arguments:
+
+=over
+
+=item queue
+
+Name of the queue to be declared. If the queue name is the empty string,
+RabbitMQ will create a unique name for the queue. This is useful for
+temporary/private reply queues.
+
+=item on_success
+
+Callback that is called when the queue was declared successfully. The argument
+to the callback is of type L<Net::AMQP::Frame::Method>. To get the name of the
+Queue (if you declared it with an empty name), you can say
+
+    on_success => sub {
+        my $method = shift;
+        my $name   = $method->method_frame->queue;
+    };
+
+=item on_failure
+
+Callback that is called when the declaration of the queue has failed.
+
+=item auto_delete
+
+0 or 1, default 0
+
+=item passive
+
+0 or 1, default 0
+
+=item durable
+
+0 or 1, default 0
+
+=item exclusive
+
+0 or 1, default 0
+
+=item no_ack
+
+0 or 1, default 1
+
+=item ticket
+
+default 0
+
+=back
+
 =head2 bind_queue
 
 Binds a queue to an exchange, with a routing key.
@@ -1170,10 +1229,18 @@ Arguments:
 
 =over
 
+=item queue
+
+The name of the queue to be consumed from.
+
 =item on_consume
 
 Callback called with an argument of the message which has been consumed.
 
+The message is a hash reference, where the value to key C<header> is an object
+of type L<Net::AMQP::Protocol::Basic::ContentHeader>, L<body> is a
+L<Net::AMQP::Frame::Body>, and C<deliver> a L<Net::AMQP::Frame::Method>.
+
 =item on_cancel
 
 Callback called if consumption is canceled.  This may be at client request
@@ -1193,6 +1260,11 @@ Callback called if the subscription was successful (before the first message is
 
 Callback called if the subscription fails for any reason.
 
+=item no_ack
+
+Pass through the C<no_ack> flag. Defaults to C<1>. If set to C<1>, the server
+will not expect messages to be acknowledged.
+
 =back
 
 =head2 publish
@@ -32,7 +32,7 @@ use AnyEvent::RabbitMQ::LocalQueue;
 
 use namespace::clean;
 
-our $VERSION = '1.18';
+our $VERSION = '1.19';
 
 use constant {
     _ST_CLOSED => 0,
@@ -734,6 +734,9 @@ You can use AnyEvent::RabbitMQ to -
   * Publish, consume, get, ack, recover and reject messages
   * Select, commit and rollback transactions
 
+Most of these actions can be done through L<AnyEvent::RabbitMQ::Channel>.
+Please see the documentation there for more details.
+
 AnyEvent::RabbitMQ is known to work with RabbitMQ versions 2.5.1 and versions 0-8 and 0-9-1 of the AMQP specification.
 
 This client is the non-blocking version, for a blocking version with a similar API, see L<Net::RabbitFoot>.