added --debug flag (repeatable)
[Biblio-RFID.git] / scripts / scan.pl
index 44156a7..f4ec02a 100755 (executable)
@@ -11,13 +11,16 @@ use RFID::Biblio::RFID501;
 
 my $loop = 0;
 my $reader;
+my $debug = 0;
 
 GetOptions(
        'loop!'     => \$loop,
        'reader=s', => \$reader,
+       'debug+'    => \$debug,
 ) || die $!;
 
 my $rfid = RFID::Biblio::Reader->new( $reader );
+$RFID::Biblio::debug = $debug;
 
 do {
        my @visible = $rfid->tags;