6 use Data::Dump qw(dump);
9 use Biblio::RFID::Reader;
18 'reader=s', => \$reader,
23 my $rfid = Biblio::RFID::Reader->new( $reader );
24 $Biblio::RFID::debug = $debug;
30 , uc unpack('H2', $rfid->afi($tag))
32 , dump( $rfid->to_hash( $tag ) )
40 my @t = localtime(time);
41 return sprintf "%04d-%02d-%02dT%02d:%02d:%02d", $t[5]+1900,$t[4]+1,$t[3],$t[2],$t[1],$t[0];
46 return if $saved->{tag} or ! $log;
47 my $hash = $rfid->to_hash( $tag );
48 open(my $fh, '>>', $log) || die "$log: $!";
49 print $fh iso_date,",$tag,", $hash->{content}, "\n";
54 my @visible = $rfid->tags(
57 print iso_date," enter ", tag($tag);
62 print iso_date," leave ", tag($tag);
66 warn iso_date," visible: ",join(' ',@visible),"\n";