#! /usr/bin/perl

# This is no real example, it is just for testing the
# server. And the server is just for testing the Quancom.pm.
# So - it's almost of no use for you :)

use strict;
use warnings;
use POSIX qw(tmpnam);
use Getopt::Long;

use blib;
use Quancom::Test::Server;

$SIG{INT} = sub { warn "got INT, exit now\n"; exit 0; };

my $opt_socket = 0;

GetOptions("socket!" => \$opt_socket)
  or die "wrong option!\n";

my $server = new Quancom::Test::Server $opt_socket ? tmpnam() : ();
$server->run;
