Skip to content

Instantly share code, notes, and snippets.

@typester
Created November 25, 2008 09:01
Show Gist options
  • Save typester/28857 to your computer and use it in GitHub Desktop.
Save typester/28857 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin::libs;
use Kamaitachi;
{
package Service::Echo;
use Moose;
extends 'Kamaitachi::Service';
with 'Kamaitachi::Service::AutoConnect';
sub on_invoke_echo {
my ($self, $session, $req) = @_;
$req->response(@{ $req->args });
}
}
my $kamaitachi = Kamaitachi->new;
$kamaitachi->register_services(
'*' => 'Service::Echo',
);
$kamaitachi->run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment