fix implementation of blank
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 29 Oct 2014 13:45:37 +0000 (14:45 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 29 Oct 2014 13:45:37 +0000 (14:45 +0100)
scripts/program.pl

index ec33b88..45a06b3 100755 (executable)
@@ -39,8 +39,7 @@ $Biblio::RFID::debug = $debug;
 foreach my $tag ( $rfid->tags ) {
        warn "visible $tag\n";
        next unless $tag eq $sid;
-       if ( $blank ) {
-warn dump( $blank );
+       if ( grep { defined $_ } values $blank ) {
                my $type = ( grep { $blank->{$_} } keys %$blank )[0];
                warn "BLANK $type $tag\n";
                $rfid->write_blocks( $tag => Biblio::RFID::RFID501->$type );