added command-line options
[Biblio-RFID.git] / scripts / RFID-JSONP-server.pl
index 104ec85..43a5920 100755 (executable)
@@ -19,10 +19,16 @@ use JSON::XS;
 use IO::Socket::INET;
 
 my $debug = 1;
-
 my $listen = '127.0.0.1:9000';
+my $reader;
+
+use Getopt::Long;
 
-my $reader = shift @ARGV;
+GetOptions(
+       'debug!'    => \$debug,
+       'listen=s', => \$listen,
+       'reader=s', => \$reader,
+) || die $!;
 
 use lib 'lib';
 use RFID::Biblio::RFID501;