use strict;
use base 'Exporter';
-our @EXPORT = qw( hex2bytes as_hex hex_tag );
+our @EXPORT = qw( hex2bytes as_hex hex_tag $debug );
use Data::Dump qw(dump);
our $VERSION = '0.02';
-my $debug = 0;
+our $debug = 0;
=head1 DESCRIPTION
in Koha Library System to provide overlay with tags in range and
check-in/check-out form-fill functionality.
+Applications can use L<RFID::Biblio::RFID501> which is some kind of
+semi-standard 3M layout or blocks on RFID tags.
+
=for readme stop
=head1 EXPORT
sub hex_tag { uc(unpack('H16', shift)) }
+=head1 WARN
+
+We are installing L<perldoc/warn> handler to controll debug output
+based on C<$Biblio::RFID::debug> level
+
+=cut
+
+BEGIN {
+ $SIG{'__WARN__'} = sub {
+ my $msg = join(' ', @_);
+ if ( $msg =~ m/^(#+)/ ) {
+ my $l = length $1;
+ return if $l > $debug;
+ }
+ warn join(' ', @_);
+ }
+}
+
=for readme continue
=head1 HARDWARE SUPPORT
Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>
+L<http://blog.rot13.org/>
+
=head1 BUGS
Please report any bugs or feature requests to C<bug-rfid-biblio at rt.cpan.org>, or through