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