fix binary detection
[Biblio-RFID.git] / lib / RFID / Biblio / librfid.pm
index bd97aa4..a7e8f00 100644 (file)
@@ -18,9 +18,11 @@ This is wrapper around C<librfid-tool> from
 
 L<http://openmrtd.org/projects/librfid/>
 
-=head2 SYOPSYS
-
+Due to limitation of C<librfid-tool> only C<inventory> and
+C<read_blocks> is supported.
 
+However, this code might provide template for integration
+with any command-line utilities for different RFID readers.
 
 =cut
 
@@ -30,7 +32,13 @@ our $bin = '/rest/cvs/librfid/utils/librfid-tool';
 
 sub init {
        my $self = shift;
-       warn "# no $bin found\n" if ! -e $bin;
+       if ( -e $bin ) {
+               warn "# using $bin";
+               return 1;
+       } else {
+               warn "# no $bin found\n";
+               return 0;
+       }
 }
 
 sub _grep_tool {
@@ -55,9 +63,6 @@ sub _grep_tool {
 
 }
 
-sub _cleanup_sid {
-}
-
 sub inventory {
 
        my @tags;