examples/test-server
changeset 12 ad264ee5d5ba
child 13 d6f681329542
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/test-server	Sun Jan 04 18:42:46 2009 +0100
@@ -0,0 +1,23 @@
+#! /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;