added 3M blank payload
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 29 Jul 2010 13:40:13 +0000 (15:40 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 29 Jul 2010 13:40:13 +0000 (15:40 +0200)
lib/RFID/Biblio/RFID501.pm
t/05-RFID501.t

index 760fe24..7d66e30 100644 (file)
@@ -118,8 +118,7 @@ sub to_hash {
 }
 
 sub from_hash {
-       my $self = shift;
-       my $hash = {@_};
+       my ( $self, $hash ) = @_;
 
        warn "## from_hash ",dump($hash);
 
@@ -138,4 +137,10 @@ sub from_hash {
        );
 }
 
+sub blank {
+
+       return ( "\x55" x ( 5 * 4 ) ) . ( "\x00" x 4 );
+
+}
+
 1;
index b4010d8..fbd7291 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 use Data::Dump qw(dump);
 
 use lib 'lib';
@@ -43,3 +43,6 @@ foreach my $tag ( @$tags ) {
 
 }
 
+ok( my $bytes = RFID::Biblio::RFID501->blank, 'blank' );
+diag dump $bytes;
+