From 85092c9643bc97fbacab4113f1de90311c00e37d Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 25 Aug 2010 18:55:24 +0200 Subject: [PATCH] rename module to Biblio::RFID --- Makefile.PL | 2 +- README | 40 ++++++++++++++-------------- ignore.txt | 2 +- lib/RFID/Biblio.pm | 44 +++++++++++++++---------------- lib/RFID/Biblio/RFID501.pm | 12 ++++----- lib/RFID/Biblio/Reader.pm | 20 +++++++------- lib/RFID/Biblio/Reader/3M810.pm | 14 +++++----- lib/RFID/Biblio/Reader/API.pm | 8 +++--- lib/RFID/Biblio/Reader/CPRM02.pm | 8 +++--- lib/RFID/Biblio/Reader/Serial.pm | 10 +++---- lib/RFID/Biblio/Reader/librfid.pm | 12 ++++----- scripts/RFID-JSONP-server.pl | 12 ++++----- scripts/print.pl | 12 ++++----- scripts/program.pl | 8 +++--- scripts/scan.pl | 10 +++---- t/00-load.t | 16 +++++------ t/05-RFID501.t | 8 +++--- t/10-3M-810.t | 4 +-- t/20-CPR-M02.t | 4 +-- t/30-librfid.t | 4 +-- t/50-Readers.t | 4 +-- 21 files changed, 127 insertions(+), 127 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 1d66bc6..1a48245 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,6 +1,6 @@ use inc::Module::Install; -name 'RFID-Biblio'; +name 'Biblio-RFID'; all_from 'lib/RFID/Biblio.pm'; author q{Dobrica Pavlinusic }; license 'gpl'; diff --git a/README b/README index 9a59e38..9610b1c 100644 --- a/README +++ b/README @@ -1,26 +1,26 @@ NAME - RFID::Biblio - perl tools to use different RFID readers for library use + Biblio::RFID - perl tools to use different RFID readers for library use DESCRIPTION Main idea is to develop simple API to reader, and than provide useful abstractions on top of it to quickly write applications to respond on - tags which come in range of RFID reader using RFID::Biblio::Reader. + tags which come in range of RFID reader using Biblio::RFID::Reader. Writing support for new RFID readers should be easy. - RFID::Biblio::Reader::API provides documentation on writing support for + Biblio::RFID::Reader::API provides documentation on writing support for different readers. - Currently, two serial RFID readers based on RFID::Biblio::Reader::Serial + Currently, two serial RFID readers based on Biblio::RFID::Reader::Serial are implemented: - * RFID::Biblio::Reader::3M810 + * Biblio::RFID::Reader::3M810 - * RFID::Biblio::Reader::CPRM02 + * Biblio::RFID::Reader::CPRM02 There is also simple read-only reader using shell commands in - RFID::Biblio::Reader::librfid. + Biblio::RFID::Reader::librfid. - For implementing application take a look at RFID::Biblio::Reader + For implementing application take a look at Biblio::RFID::Reader `scripts/RFID-JSONP-server.pl' is example of such application. It's local interface to RFID reader and JSONP REST server. @@ -29,18 +29,18 @@ DESCRIPTION inserted in Koha Library System to provide overlay with tags in range and check-in/check-out form-fill functionality. - Applications can use RFID::Biblio::RFID501 which is some kind of + Applications can use Biblio::RFID::RFID501 which is some kind of semi-standard 3M layout or blocks on RFID tags. HARDWARE SUPPORT 3M 810 - RFID::Biblio::Reader::3M810 + Biblio::RFID::Reader::3M810 CPR-M02 - RFID::Biblio::Reader::CPRM02 + Biblio::RFID::Reader::CPRM02 librfid - RFID::Biblio::Reader::librfid + Biblio::RFID::Reader::librfid AUTHOR Dobrica Pavlinusic, `' @@ -50,30 +50,30 @@ AUTHOR BUGS Please report any bugs or feature requests to `bug-rfid-biblio at rt.cpan.org', or through the web interface at - http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RFID-Biblio. I will be + http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Biblio-RFID. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT You can find documentation for this module with the perldoc command. - perldoc RFID::Biblio - perldoc RFID::Biblio::Reader - perldoc RFID::Biblio::Reader::API + perldoc Biblio::RFID + perldoc Biblio::RFID::Reader + perldoc Biblio::RFID::Reader::API You can also look for information at: * RT: CPAN's request tracker - http://rt.cpan.org/NoAuth/Bugs.html?Dist=RFID-Biblio + http://rt.cpan.org/NoAuth/Bugs.html?Dist=Biblio-RFID * AnnoCPAN: Annotated CPAN documentation - http://annocpan.org/dist/RFID-Biblio + http://annocpan.org/dist/Biblio-RFID * CPAN Ratings - http://cpanratings.perl.org/d/RFID-Biblio + http://cpanratings.perl.org/d/Biblio-RFID * Search CPAN - http://search.cpan.org/dist/RFID-Biblio/ + http://search.cpan.org/dist/Biblio-RFID/ ACKNOWLEDGEMENTS LICENSE AND COPYRIGHT diff --git a/ignore.txt b/ignore.txt index bf53570..73048da 100644 --- a/ignore.txt +++ b/ignore.txt @@ -9,4 +9,4 @@ pm_to_blib* .lwpcookies cover_db pod2htm*.tmp -RFID-Biblio-* +Biblio-RFID-* diff --git a/lib/RFID/Biblio.pm b/lib/RFID/Biblio.pm index 88014a4..7b8df2d 100644 --- a/lib/RFID/Biblio.pm +++ b/lib/RFID/Biblio.pm @@ -1,4 +1,4 @@ -package RFID::Biblio; +package Biblio::RFID; use warnings; use strict; @@ -10,7 +10,7 @@ use Data::Dump qw(dump); =head1 NAME -RFID::Biblio - perl tools to use different RFID readers for library use +Biblio::RFID - perl tools to use different RFID readers for library use =cut @@ -23,31 +23,31 @@ our $debug = 0; Main idea is to develop simple API to reader, and than provide useful abstractions on top of it to quickly write applications to respond on -tags which come in range of RFID reader using L. +tags which come in range of RFID reader using L. Writing support for new RFID readers should be easy. -L provides documentation on writing support +L provides documentation on writing support for different readers. -Currently, two serial RFID readers based on L +Currently, two serial RFID readers based on L are implemented: =over 4 =item * -L +L =item * -L +L =back There is also simple read-only reader using shell commands in -L. +L. -For implementing application take a look at L +For implementing application take a look at L C is example of such application. It's local interface to RFID reader and JSONP REST server. @@ -56,7 +56,7 @@ C is jQuery based JavaScript code which can be inserted in Koha Library System to provide overlay with tags in range and check-in/check-out form-fill functionality. -Applications can use L which is some kind of +Applications can use L which is some kind of semi-standard 3M layout or blocks on RFID tags. =for readme stop @@ -132,15 +132,15 @@ BEGIN { =head2 3M 810 -L +L =head2 CPR-M02 -L +L =head2 librfid -L +L =head1 AUTHOR @@ -152,7 +152,7 @@ L =head1 BUGS Please report any bugs or feature requests to C, or through -the web interface at L. I will be notified, and then you'll +the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. @@ -162,9 +162,9 @@ automatically be notified of progress on your bug as I make changes. You can find documentation for this module with the perldoc command. - perldoc RFID::Biblio - perldoc RFID::Biblio::Reader - perldoc RFID::Biblio::Reader::API + perldoc Biblio::RFID + perldoc Biblio::RFID::Reader + perldoc Biblio::RFID::Reader::API You can also look for information at: @@ -173,19 +173,19 @@ You can also look for information at: =item * RT: CPAN's request tracker -L +L =item * AnnoCPAN: Annotated CPAN documentation -L +L =item * CPAN Ratings -L +L =item * Search CPAN -L +L =back @@ -214,4 +214,4 @@ if not, write to the Free Software Foundation, Inc., =cut -1; # End of RFID::Biblio +1; # End of Biblio::RFID diff --git a/lib/RFID/Biblio/RFID501.pm b/lib/RFID/Biblio/RFID501.pm index 131d980..97d3ee0 100644 --- a/lib/RFID/Biblio/RFID501.pm +++ b/lib/RFID/Biblio/RFID501.pm @@ -1,4 +1,4 @@ -package RFID::Biblio::RFID501; +package Biblio::RFID::RFID501; use warnings; use strict; @@ -7,7 +7,7 @@ use Data::Dump qw(dump); =head1 NAME -RFID::Biblio::RFID501 - RFID Standard for Libraries +Biblio::RFID::RFID501 - RFID Standard for Libraries =head1 DESCRIPTION @@ -81,19 +81,19 @@ unsecured (door will ignore it) =head2 to_hash - my $hash = RFID::Biblio::Decode::RFID501->to_hash( $bytes ); + my $hash = Biblio::RFID::Decode::RFID501->to_hash( $bytes ); - my $hash = RFID::Biblio::Decode::RFID501->to_hash( [ 'blk1', 'blk2', ... , 'blk7' ] ); + my $hash = Biblio::RFID::Decode::RFID501->to_hash( [ 'blk1', 'blk2', ... , 'blk7' ] ); =head2 from_hash - my $blocks = RFID::Biblio::Decode::RFID->from_hash({ content => "1301234567" }); + my $blocks = Biblio::RFID::Decode::RFID->from_hash({ content => "1301234567" }); =head2 blank_3m =head2 blank - my $blocks = RFID::Biblio::Decode::RFID->blank; + my $blocks = Biblio::RFID::Decode::RFID->blank; =cut diff --git a/lib/RFID/Biblio/Reader.pm b/lib/RFID/Biblio/Reader.pm index 01d82d8..f5e6fd4 100644 --- a/lib/RFID/Biblio/Reader.pm +++ b/lib/RFID/Biblio/Reader.pm @@ -1,4 +1,4 @@ -package RFID::Biblio::Reader; +package Biblio::RFID::Reader; use warnings; use strict; @@ -6,23 +6,23 @@ use strict; use Data::Dump qw(dump); use Time::HiRes; use lib 'lib'; -use RFID::Biblio; +use Biblio::RFID; use Carp qw(confess); =head1 NAME -RFID::Biblio::Reader - simple way to write RFID applications in perl +Biblio::RFID::Reader - simple way to write RFID applications in perl =head1 DESCRIPTION This module will probe all available readers and use calls from -L to invoke correct reader. +L to invoke correct reader. =head1 FUNCTIONS =head2 new - my $rfid = RFID::Biblio::Reader->new( 'optional reader filter' ); + my $rfid = Biblio::RFID::Reader->new( 'optional reader filter' ); =cut @@ -123,7 +123,7 @@ sub _invalidate_tag { Probe each RFID reader supported and returns succefull ones - my $rfid_readers = RFID::Biblio::Reader->_available( $regex_filter ); + my $rfid_readers = Biblio::RFID::Reader->_available( $regex_filter ); =cut @@ -140,7 +140,7 @@ sub _available { foreach my $reader ( @readers ) { next if $filter && $reader !~ /$filter/i; - my $module = "RFID::Biblio::Reader::$reader"; + my $module = "Biblio::RFID::Reader::$reader"; eval "use $module"; die $@ if $@; if ( my $rfid = $module->new ) { @@ -189,9 +189,9 @@ __END__ =head2 RFID reader implementations -L +L -L +L -L +L diff --git a/lib/RFID/Biblio/Reader/3M810.pm b/lib/RFID/Biblio/Reader/3M810.pm index b3848c4..a1b21a1 100644 --- a/lib/RFID/Biblio/Reader/3M810.pm +++ b/lib/RFID/Biblio/Reader/3M810.pm @@ -1,16 +1,16 @@ -package RFID::Biblio::Reader::3M810; +package Biblio::RFID::Reader::3M810; =head1 NAME -RFID::Biblio::Reader::3M810 - support for 3M 810 RFID reader +Biblio::RFID::Reader::3M810 - support for 3M 810 RFID reader =head1 DESCRIPTION -This module uses L over USB/serial adapter +This module uses L over USB/serial adapter with 3M 810 RFID reader, often used in library applications. This is most mature implementation which supports full API defined -in L. This include scanning for all tags in reader +in L. This include scanning for all tags in reader range, reading and writing of data, and AFI security manipulation. This implementation is developed using Portmon on Windows to capture serial traffic @@ -27,8 +27,8 @@ this reader is available at L use warnings; use strict; -use base 'RFID::Biblio::Reader::Serial'; -use RFID::Biblio; +use base 'Biblio::RFID::Reader::Serial'; +use Biblio::RFID; use Data::Dump qw(dump); use Carp qw(confess); @@ -308,4 +308,4 @@ __END__ =head1 SEE ALSO -L +L diff --git a/lib/RFID/Biblio/Reader/API.pm b/lib/RFID/Biblio/Reader/API.pm index 70354d5..e6808c0 100644 --- a/lib/RFID/Biblio/Reader/API.pm +++ b/lib/RFID/Biblio/Reader/API.pm @@ -1,11 +1,11 @@ -package RFID::Biblio::Reader::API; +package Biblio::RFID::Reader::API; use warnings; use strict; =head1 NAME -RFID::Biblio::Reader::API - low-level RFID reader documentation +Biblio::RFID::Reader::API - low-level RFID reader documentation =cut @@ -29,7 +29,7 @@ All blocks are under key which is tag UID with array of blocks returned from rea $hash = { 'E000000123456789' => [ 'blk1', 'blk2', ... ] }; -L sends tag UID with data payload, so we might expect +L sends tag UID with data payload, so we might expect to receive response from other tags from protocol specification, =head2 write_blocks @@ -53,7 +53,7 @@ to receive response from other tags from protocol specification, Just calls C in reader implementation so this class can be used as simple stub base class like -L does +L does =cut diff --git a/lib/RFID/Biblio/Reader/CPRM02.pm b/lib/RFID/Biblio/Reader/CPRM02.pm index 425546c..0992fc8 100644 --- a/lib/RFID/Biblio/Reader/CPRM02.pm +++ b/lib/RFID/Biblio/Reader/CPRM02.pm @@ -1,8 +1,8 @@ -package RFID::Biblio::Reader::CPRM02; +package Biblio::RFID::Reader::CPRM02; =head1 NAME -RFID::Biblio::Reader::CPRM02 - support for CPR-M02 RFID reader +Biblio::RFID::Reader::CPRM02 - support for CPR-M02 RFID reader =head1 DESCRIPTION @@ -14,8 +14,8 @@ reader as described in document C use warnings; use strict; -use base 'RFID::Biblio::Reader::Serial'; -use RFID::Biblio; +use base 'Biblio::RFID::Reader::Serial'; +use Biblio::RFID; use Time::HiRes; use Data::Dump qw(dump); diff --git a/lib/RFID/Biblio/Reader/Serial.pm b/lib/RFID/Biblio/Reader/Serial.pm index b09875f..39282f0 100644 --- a/lib/RFID/Biblio/Reader/Serial.pm +++ b/lib/RFID/Biblio/Reader/Serial.pm @@ -1,4 +1,4 @@ -package RFID::Biblio::Reader::Serial; +package Biblio::RFID::Reader::Serial; use warnings; use strict; @@ -8,7 +8,7 @@ use Data::Dump qw(dump); =head1 NAME -RFID::Biblio::Reader::Serial - base class for serial RFID readers +Biblio::RFID::Reader::Serial - base class for serial RFID readers =head1 METHODS @@ -81,9 +81,9 @@ __END__ =head1 SEE ALSO -L +L -L +L -L +L diff --git a/lib/RFID/Biblio/Reader/librfid.pm b/lib/RFID/Biblio/Reader/librfid.pm index 57ba7c4..3cadbb1 100644 --- a/lib/RFID/Biblio/Reader/librfid.pm +++ b/lib/RFID/Biblio/Reader/librfid.pm @@ -1,16 +1,16 @@ -package RFID::Biblio::Reader::librfid; +package Biblio::RFID::Reader::librfid; use warnings; use strict; -use base 'RFID::Biblio::Reader::API'; -use RFID::Biblio; +use base 'Biblio::RFID::Reader::API'; +use Biblio::RFID; use Data::Dump qw(dump); =head1 NAME -RFID::Biblio::Reader::librfid - execute librfid-tool +Biblio::RFID::Reader::librfid - execute librfid-tool =head1 DESCRIPTION @@ -19,8 +19,8 @@ This is wrapper around C from L Due to limitation of L only -L and -L is supported. +L and +L is supported. However, this code might provide template for integration with any command-line utilities for different RFID readers. diff --git a/scripts/RFID-JSONP-server.pl b/scripts/RFID-JSONP-server.pl index 2575c57..5c2f985 100755 --- a/scripts/RFID-JSONP-server.pl +++ b/scripts/RFID-JSONP-server.pl @@ -31,9 +31,9 @@ GetOptions( ) || die $!; use lib 'lib'; -use RFID::Biblio::RFID501; -use RFID::Biblio::Reader; -my $rfid = RFID::Biblio::Reader->new( shift @ARGV ); +use Biblio::RFID::RFID501; +use Biblio::RFID::Reader; +my $rfid = Biblio::RFID::Reader->new( shift @ARGV ); my $index_html; { @@ -97,7 +97,7 @@ sub http_server { my @tags = $rfid->tags; my $json = { time => time() }; foreach my $tag ( @tags ) { - my $hash = RFID::Biblio::RFID501->to_hash( $rfid->blocks( $tag ) ); + my $hash = Biblio::RFID::RFID501->to_hash( $rfid->blocks( $tag ) ); $hash->{sid} = $tag; $hash->{security} = uc unpack 'H*', $rfid->afi( $tag ); push @{ $json->{tags} }, $hash; @@ -112,8 +112,8 @@ sub http_server { foreach my $p ( keys %$param ) { next unless $p =~ m/^(E[0-9A-F]{15})$/; my $tag = $1; - my $content = RFID::Biblio::RFID501->from_hash({ content => $param->{$p} }); - $content = RFID::Biblio::RFID501->blank if $param->{$p} eq 'blank'; + my $content = Biblio::RFID::RFID501->from_hash({ content => $param->{$p} }); + $content = Biblio::RFID::RFID501->blank if $param->{$p} eq 'blank'; $status = 302; warn "PROGRAM $tag $content\n"; diff --git a/scripts/print.pl b/scripts/print.pl index 04abc05..1eab270 100755 --- a/scripts/print.pl +++ b/scripts/print.pl @@ -6,8 +6,8 @@ use strict; use Data::Dump qw(dump); use Getopt::Long; use lib 'lib'; -use RFID::Biblio::Reader; -use RFID::Biblio::RFID501; +use Biblio::RFID::Reader; +use Biblio::RFID::RFID501; use Storable; my $evolis_dir = '/home/dpavlin/klin/Printer-EVOLIS'; # FIXME @@ -55,8 +55,8 @@ while(<>) { print "# queue ", dump @queue; -my $rfid = RFID::Biblio::Reader->new( $reader ); -$RFID::Biblio::debug = $debug; +my $rfid = Biblio::RFID::Reader->new( $reader ); +$Biblio::RFID::debug = $debug; sub tag { my $tag = shift; @@ -64,7 +64,7 @@ sub tag { , " AFI: " , uc unpack('H2', $rfid->afi($tag)) , " " - , dump( RFID::Biblio::RFID501->to_hash( $rfid->blocks($tag) ) ) + , dump( Biblio::RFID::RFID501->to_hash( $rfid->blocks($tag) ) ) , $/ ; } @@ -98,7 +98,7 @@ do { my $card = shift @queue; my $number = $card->[0]; print "PROGRAM $tag $number\n"; - $rfid->write_blocks( $tag => RFID::Biblio::RFID501->from_hash({ content => $number }) ); + $rfid->write_blocks( $tag => Biblio::RFID::RFID501->from_hash({ content => $number }) ); $rfid->write_afi( $tag => chr($afi) ) if $afi; $programmed->{$tag} = $number; diff --git a/scripts/program.pl b/scripts/program.pl index 00e7a6e..443e475 100755 --- a/scripts/program.pl +++ b/scripts/program.pl @@ -6,8 +6,8 @@ use strict; use Data::Dump qw(dump); use Getopt::Long; use lib 'lib'; -use RFID::Biblio::Reader; -use RFID::Biblio::RFID501; +use Biblio::RFID::Reader; +use Biblio::RFID::RFID501; my $reader; my $afi; @@ -20,14 +20,14 @@ GetOptions( my ( $sid, $content ) = @ARGV; die "usage: $0 [--reader regex_filter] [--afi 214] E0_RFID_SID [barcode]\n" unless $sid && ( $content | $afi ); -my @rfid = RFID::Biblio::Reader->available( $reader ); +my @rfid = Biblio::RFID::Reader->available( $reader ); foreach my $rfid ( @rfid ) { my $visible = $rfid->scan; foreach my $tag ( keys %$visible ) { next unless $tag eq $sid; warn "PROGRAM $tag with $content\n"; - $rfid->write_blocks( $tag => RFID::Biblio::RFID501->from_hash({ content => $content }) ); + $rfid->write_blocks( $tag => Biblio::RFID::RFID501->from_hash({ content => $content }) ); $rfid->write_afi( $tag => chr($afi) ) if $afi; } } diff --git a/scripts/scan.pl b/scripts/scan.pl index 8ed02d8..285352f 100755 --- a/scripts/scan.pl +++ b/scripts/scan.pl @@ -6,8 +6,8 @@ use strict; use Data::Dump qw(dump); use Getopt::Long; use lib 'lib'; -use RFID::Biblio::Reader; -use RFID::Biblio::RFID501; +use Biblio::RFID::Reader; +use Biblio::RFID::RFID501; my $loop = 0; my $reader; @@ -19,8 +19,8 @@ GetOptions( 'debug+' => \$debug, ) || die $!; -my $rfid = RFID::Biblio::Reader->new( $reader ); -$RFID::Biblio::debug = $debug; +my $rfid = Biblio::RFID::Reader->new( $reader ); +$Biblio::RFID::debug = $debug; sub tag { my $tag = shift; @@ -28,7 +28,7 @@ sub tag { , " AFI: " , uc unpack('H2', $rfid->afi($tag)) , " " - , dump( RFID::Biblio::RFID501->to_hash( $rfid->blocks($tag) ) ) + , dump( Biblio::RFID::RFID501->to_hash( $rfid->blocks($tag) ) ) , $/ ; } diff --git a/t/00-load.t b/t/00-load.t index 11936d9..e780116 100755 --- a/t/00-load.t +++ b/t/00-load.t @@ -4,13 +4,13 @@ use Test::More tests => 7; BEGIN { use lib 'lib'; - use_ok( 'RFID::Biblio' ); - use_ok( 'RFID::Biblio::Reader::API' ); - use_ok( 'RFID::Biblio::Reader::Serial' ); - use_ok( 'RFID::Biblio::Reader::3M810' ); - use_ok( 'RFID::Biblio::Reader::CPRM02' ); - use_ok( 'RFID::Biblio::Reader::librfid' ); - use_ok( 'RFID::Biblio::Reader' ); + use_ok( 'Biblio::RFID' ); + use_ok( 'Biblio::RFID::Reader::API' ); + use_ok( 'Biblio::RFID::Reader::Serial' ); + use_ok( 'Biblio::RFID::Reader::3M810' ); + use_ok( 'Biblio::RFID::Reader::CPRM02' ); + use_ok( 'Biblio::RFID::Reader::librfid' ); + use_ok( 'Biblio::RFID::Reader' ); } -diag( "Testing RFID::Biblio $RFID::Biblio::VERSION, Perl $], $^X" ); +diag( "Testing Biblio::RFID $Biblio::RFID::VERSION, Perl $], $^X" ); diff --git a/t/05-RFID501.t b/t/05-RFID501.t index fbd7291..5df40fe 100755 --- a/t/05-RFID501.t +++ b/t/05-RFID501.t @@ -6,7 +6,7 @@ use Data::Dump qw(dump); use lib 'lib'; BEGIN { - use_ok( 'RFID::Biblio::RFID501' ); + use_ok( 'Biblio::RFID::RFID501' ); } my $tags = @@ -32,10 +32,10 @@ my $tags = foreach my $tag ( @$tags ) { - ok( $hash = RFID::Biblio::RFID501->to_hash( $tag ), 'to_hash' ); + ok( $hash = Biblio::RFID::RFID501->to_hash( $tag ), 'to_hash' ); diag dump $hash; - ok( $bytes = RFID::Biblio::RFID501->from_hash( $hash ), 'from_hash' ); + ok( $bytes = Biblio::RFID::RFID501->from_hash( $hash ), 'from_hash' ); my $orig = join('', @$tag); cmp_ok( $bytes, 'eq', $orig, 'roundtrip' ); @@ -43,6 +43,6 @@ foreach my $tag ( @$tags ) { } -ok( my $bytes = RFID::Biblio::RFID501->blank, 'blank' ); +ok( my $bytes = Biblio::RFID::RFID501->blank, 'blank' ); diag dump $bytes; diff --git a/t/10-3M-810.t b/t/10-3M-810.t index 1118c4d..6476aca 100755 --- a/t/10-3M-810.t +++ b/t/10-3M-810.t @@ -6,10 +6,10 @@ use Data::Dump qw(dump); use lib 'lib'; BEGIN { - use_ok( 'RFID::Biblio::Reader::3M810' ); + use_ok( 'Biblio::RFID::Reader::3M810' ); } -ok( my $o = RFID::Biblio::Reader::3M810->new( device => '/dev/ttyUSB0' ), 'new' ); +ok( my $o = Biblio::RFID::Reader::3M810->new( device => '/dev/ttyUSB0' ), 'new' ); ok( my @tags = $o->inventory, 'inventory' ); diag dump @tags; diff --git a/t/20-CPR-M02.t b/t/20-CPR-M02.t index 81488b7..ca225a4 100755 --- a/t/20-CPR-M02.t +++ b/t/20-CPR-M02.t @@ -6,10 +6,10 @@ use Data::Dump qw(dump); use lib 'lib'; BEGIN { - use_ok( 'RFID::Biblio::Reader::CPRM02' ); + use_ok( 'Biblio::RFID::Reader::CPRM02' ); } -ok( my $o = RFID::Biblio::Reader::CPRM02->new( device => '/dev/ttyUSB0' ), 'new' ); +ok( my $o = Biblio::RFID::Reader::CPRM02->new( device => '/dev/ttyUSB0' ), 'new' ); my @tags = $o->inventory; diag 'inventory ',dump(@tags); diff --git a/t/30-librfid.t b/t/30-librfid.t index 4bb894d..6e207e2 100755 --- a/t/30-librfid.t +++ b/t/30-librfid.t @@ -6,10 +6,10 @@ use Data::Dump qw(dump); use lib 'lib'; BEGIN { - use_ok( 'RFID::Biblio::Reader::librfid' ); + use_ok( 'Biblio::RFID::Reader::librfid' ); } -ok( my $o = RFID::Biblio::Reader::librfid->new( tool => '/rest/cvs/librfid/utils/librfid-tool' ), 'new' ); +ok( my $o = Biblio::RFID::Reader::librfid->new( tool => '/rest/cvs/librfid/utils/librfid-tool' ), 'new' ); my @tags = $o->inventory; diag 'inventory = ', dump @tags; diff --git a/t/50-Readers.t b/t/50-Readers.t index cd99368..469af16 100755 --- a/t/50-Readers.t +++ b/t/50-Readers.t @@ -6,10 +6,10 @@ use Data::Dump qw(dump); use lib 'lib'; BEGIN { - use_ok( 'RFID::Biblio::Reader' ); + use_ok( 'Biblio::RFID::Reader' ); } -ok( my $o = RFID::Biblio::Reader->new( shift @ARGV ), 'new' ); +ok( my $o = Biblio::RFID::Reader->new( shift @ARGV ), 'new' ); ok( my $tags = [ $o->tags ], 'tags' ); diag 'tags: ', dump( $tags ); -- 2.20.1