X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=lib%2FBiblio%2FRFID%2FSmartX.pm;h=4c7829713578dac2e578de8a641fe9ff73f27195;hb=afae97aece05790881ac18dee6944a4a7b4e26e2;hp=27aa15c38c0cef7e8ce02478b26b94a8dc69e930;hpb=fd7265841c2298d972793f1ccdb3b8c1c9f0d374;p=Biblio-RFID.git diff --git a/lib/Biblio/RFID/SmartX.pm b/lib/Biblio/RFID/SmartX.pm index 27aa15c..4c78297 100644 --- a/lib/Biblio/RFID/SmartX.pm +++ b/lib/Biblio/RFID/SmartX.pm @@ -20,6 +20,7 @@ Biblio::RFID::SmartX - Croatian student cards format sub bcd { my $data = shift; + no warnings; return join('', map { sprintf("%02x",ord($_)) } split (//, $data)); } @@ -36,6 +37,8 @@ sub to_hash { $decoded->[$_] = bcd( $data->[$_] ); } + no warnings; + my $hash; $hash->{SXID} = substr( $decoded->[4], 0, 20 ); $hash->{JMBAG} = substr( $decoded->[4], 22, 10 );