1 package # Hide from PAUSE
2 StompTestApp::Controller::TestController;
4 use namespace::autoclean;
6 BEGIN { extends 'Catalyst::Controller::MessageDriven' };
8 sub testaction : Local {
9 my ($self, $c, $request) = @_;
11 # Reply with a minimal response message
12 my $response = { type => 'testaction_response' };
13 $c->stash->{response} = $response;
16 sub badaction : Local {
17 my ($self, $c, $request) = @_;
22 my ($self, $c, $request) = @_;
23 if ($request->{type} eq 'ping') {
24 $c->stash->{response} = { status => 'PONG' };
27 die "not a ping request?";