Incorrect search filter: invalid characters - *.p[ml]
AMQP

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

        Appendix: How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.

  To do so, attach the following notices to the program.  It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>

Makefile.PL  view on Meta::CPAN

  "DISTNAME" => "AMQP",
  "EXE_FILES" => [],
  "LICENSE" => "perl",
  "NAME" => "AMQP",
  "PREREQ_PM" => {
    "AnyEvent::RabbitMQ" => "1.15",
    "Mojolicious" => "4.26"
  },
  "TEST_REQUIRES" => {},
  "VERSION" => "0.01",
  "test" => {
    "TESTS" => "t/*.t"
  }
);


unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
  my $tr = delete $WriteMakefileArgs{TEST_REQUIRES};
  my $br = $WriteMakefileArgs{BUILD_REQUIRES};
  for my $mod ( keys %$tr ) {
    if ( exists $br->{$mod} ) {

cpanfile.snapshot  view on Meta::CPAN

      Mojolicious::Command::generate undef
      Mojolicious::Command::generate::app undef
      Mojolicious::Command::generate::lite_app undef
      Mojolicious::Command::generate::makefile undef
      Mojolicious::Command::generate::plugin 0.01
      Mojolicious::Command::get undef
      Mojolicious::Command::inflate undef
      Mojolicious::Command::prefork undef
      Mojolicious::Command::psgi undef
      Mojolicious::Command::routes undef
      Mojolicious::Command::test undef
      Mojolicious::Command::version undef
      Mojolicious::Commands undef
      Mojolicious::Controller undef
      Mojolicious::Lite undef
      Mojolicious::Plugin undef
      Mojolicious::Plugin::Charset undef
      Mojolicious::Plugin::Config undef
      Mojolicious::Plugin::Config::Sandbox undef
      Mojolicious::Plugin::DefaultHelpers undef
      Mojolicious::Plugin::EPLRenderer undef

lib/AMQP.pm  view on Meta::CPAN

=head1 NAME

AMQP -- Base class for AMQP utilities

=head1 SYNOPSIS

  package AMQP::MyUtility;
  use Mojo::Base 'AMQP';
 
  my $util = AMQP::MyUtility->new;
  $util->server('amqp://amqp.perl.org:5672/test');

=head1 DESCRIPTION

The AMQP class provides the basic functionality common to all AMQP utility classes.

=head1 METHODS

B<server($url)>

Configures all of the connection settings based on an AMQP url.  The format of which is:

lib/AMQP/Publisher.pm  view on Meta::CPAN

=pod

=head1 NAME

AMQP::Publisher -- Publishes messages to an exchange.

=head1 SYNOPSIS
  
 use AMQP::Publisher;
 my $publisher = AMQP::Publisher->new;
 $publisher->server('amqp://foo:bar@localhost:5672/testing');
 $publisher->exchange('test');
 $publisher->type('topic');
 $publisher->queue('testing');
 $publisher->on_connect( sub {
 	my ($self) = @_;
	$self->channel->send('hello world');
 });
 $publisher->attach;

=head1 DESCRIPTION

The AMQP::Publisher publishes messages to an AMQP exchange

lib/AMQP/Subscriber.pm  view on Meta::CPAN

use Sys::Hostname;

has 'debug' => 1;
has 'host' => 'localhost';
has 'port' => 5672;
has 'username' => 'guest';
has 'password' => 'guest';
has 'vhost' => '/';
has 'timeout' => 1;
has 'heartbeat' => 30;
has 'exchange' => 'test';
has 'type' => 'topic';
has 'key' => '#';
has 'queue' => 'test';
has 'rabbit';
has 'connection';
has 'channel';
has 'status';
has 'tag' => $ENV{LOGNAME} . "@" . hostname;
has 'on_message';

sub attach {
	my $self = shift;
	$self->useragent(Mojo::UserAgent->new);

lib/AMQP/Subscriber.pm  view on Meta::CPAN

=pod

=head1 NAME

AMQP::Subscriber -- Listens for messages on a queue and does stuff with them.

=head1 SYNOPSIS
  
 use AMQP::Subscriber;
 my $subscriber = AMQP::Subscriber->new;
 $subscriber->server('amqp://foo:bar@localhost:5672/testing');
 $subscriber->exchange('test');
 $subscriber->type('topic');
 $subscriber->queue('testing');
 $subscriber->callback( sub {
 	my ($self,$message) = @_;
	say $message;
 });
 $subscriber->attach;

=head1 DESCRIPTION

The AMQP::Subscriber wraps 

t/publisher.t  view on Meta::CPAN

use Test::More tests => 2;
use Test::Mojo;
use lib './lib';

require_ok('AMQP::Publisher');

my $p = AMQP::Publisher->new;

isa_ok($p,'AMQP::Publisher');

t/subscriber.t  view on Meta::CPAN

use Test::Mojo;
use lib './lib';

require_ok('AMQP::Subscriber');

my $s = AMQP::Subscriber->new;

isa_ok($s,'AMQP::Subscriber');

# Test overriding the defaults
$s->server('amqp://foo:bar@test:25672/test');
is($s->host, 'test', 'host set');
is($s->port, 25672, 'port set');
is($s->vhost, 'test', 'vhost set');
is($s->username, 'foo', 'user set');
is($s->password, 'bar', 'password set');

# Test the defaults
$s->server();
is($s->host, 'localhost', 'localhost default');
is($s->port, 5672, 'port default');
is($s->vhost, '/', 'vhost default');
is($s->username, 'guest', 'user default');
is($s->password, 'guest', 'password default');


done_testing();



( run in 0.377 second using v1.01-cache-2.11-cpan-87723dcf8b7 )