Skip to content

Commit

Permalink
Net::Stomp => Net::STOMP::Client
Browse files Browse the repository at this point in the history
  • Loading branch information
throughnothing committed Feb 21, 2012
1 parent 9acc69e commit 7b5d9fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Dancer/Plugin/Stomp.pm
Expand Up @@ -2,7 +2,7 @@ package Dancer::Plugin::Stomp;
use strict;
use warnings;
use Dancer::Plugin;
use Net::Stomp;
use Net::STOMP::Client;

# VERSION

Expand All @@ -27,7 +27,7 @@ register stomp => sub {
my $port = 61613;
$port = $params->{port} if exists $params->{port};

my $stomp = Net::Stomp->new({ hostname => $hostname, port => $port });
my $stomp = Net::STOMP::Client->new( host => $hostname, port => $port );

my $auto_connect = 1;
$auto_connect = $params->{auto_connect} if exists $params->{auto_connect};
Expand All @@ -37,7 +37,7 @@ register stomp => sub {
$conn_info{login} = $params->{login} if exists $params->{login};
$conn_info{passcode} = $params->{passcode}
if exists $params->{passcode};
$stomp->connect(\%conn_info);
$stomp->connect(%conn_info);
}

return $stomps{$name} = $stomp;
Expand All @@ -53,7 +53,7 @@ register_plugin;
use Dancer::Plugin::Stomp;
post '/messages' => sub {
stomp->send({ destination => '/queue/foo', body => request->body });
stomp->send( destination => '/queue/foo', body => request->body );
};
dance;
Expand All @@ -75,7 +75,7 @@ Configuration requires a hostname at a minimum.
The above configuration will allow you to send a message very simply:
stomp->send({ destination => '/queue/foo', body => 'hello' });
stomp->send( destination => '/queue/foo', body => 'hello' );
Multiple Stomp clients can also be configured:
Expand Down

0 comments on commit 7b5d9fe

Please sign in to comment.