X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Engine-STOMP.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FStomp.pm;h=21b275d27b3496820851fc0235c467cf08fbf7d0;hp=20da9d237aa8c9f9e20cd24a149d0396a530f73b;hb=bd1954f9fb32631d0c9d3130aec292c5577abe4b;hpb=6e81857d01f942e507b6ab2be95d43e56de25b65 diff --git a/lib/Catalyst/Engine/Stomp.pm b/lib/Catalyst/Engine/Stomp.pm index 20da9d2..21b275d 100644 --- a/lib/Catalyst/Engine/Stomp.pm +++ b/lib/Catalyst/Engine/Stomp.pm @@ -46,10 +46,10 @@ Catalyst::Engine::Stomp - write message handling apps with Catalyst. # The default serialization is YAML, but this configuration # may be overridden in your controller: __PACKAGE__->config( - 'default' => 'text/x-yaml', - 'stash_key' => 'rest', - 'map' => { 'text/x-yaml' => 'YAML' }, - ); + 'default' => 'text/x-yaml', + 'stash_key' => 'rest', + 'map' => { 'text/x-yaml' => 'YAML' }, + ); =head1 DESCRIPTION @@ -101,18 +101,18 @@ sub run { # subscribe, with client ack. foreach my $queue (@queues) { - my $queue_name = "/queue/$queue"; - $self->connection->subscribe({ - destination => $queue_name, - ack => 'client', - }); + my $queue_name = "/queue/$queue"; + $self->connection->subscribe({ + destination => $queue_name, + ack => 'client', + }); } # enter loop... while (1) { - my $frame = $self->connection->receive_frame(); - $self->handle_stomp_frame($app, $frame); - last if $ENV{ENGINE_ONESHOT}; + my $frame = $self->connection->receive_frame(); + $self->handle_stomp_frame($app, $frame); + last if $ENV{ENGINE_ONESHOT}; } exit 0; } @@ -142,7 +142,7 @@ sub finalize_headers { my ($self, $c) = @_; my $error = join "\n", @{$c->error}; if ($error) { - $c->log->debug($error); + $c->log->debug($error); } return $self->next::method($c); } @@ -158,13 +158,13 @@ sub handle_stomp_frame { my $command = $frame->command(); if ($command eq 'MESSAGE') { - $self->handle_stomp_message($app, $frame); + $self->handle_stomp_message($app, $frame); } elsif ($command eq 'ERROR') { - $self->handle_stomp_error($app, $frame); + $self->handle_stomp_error($app, $frame); } else { - $app->log->debug("Got unknown Stomp command: $command"); + $app->log->debug("Got unknown Stomp command: $command"); } }