Biblio...Reader(3pm)
β¨ Biblio::RFID::Reader β the perl manual page but make it cute β¨
okay so bestie, welcome to Biblio...Reader π this lil page lives in the User Contributed Perl Documentation section of the perl man pages, and it's your backstage pass to the whole Biblio::RFID::Reader situation. grab a strawberry π and let's go.
π NAME π
Biblio::RFID::Reader β literally the simplest way to write RFID applications in perl. no cap. π
π¦ DESCRIPTION π¦
okay so here's the vibe: this module probes all available readers for you β like it goes around asking everyone "hey are you there, are you real" β and then it uses calls from Biblio::RFID::Reader::API to invoke whichever reader is the correct one. so you don't have to play matchmaker yourself. it just knows. π
π FUNCTIONS π
new
my $rfid = Biblio::RFID::Reader->new( 'optional reader filter' );
you're making a new object, periodt. you can hand it an optional reader filter if you're feeling picky about which reader you wanna vibe with. β¨
tags
my @visible = $rfid->tags(
enter => sub { my $tag = shift; },
leave => sub { my $tag = shift; },
reader => sub { my $reader = shift; ref($reader) =~ m/something/ },
);
this one gives you back all the visible tags in a list β @visible, iconic. and you can pass it callbacks: an enter sub for when a tag shows up, a leave sub for when a tag dips out, and a reader sub where you get the reader handed to you and you can do your own regex match on ref($reader) to filter. main character filtering energy. π«Ά
blocks
my $blocks_arrayref = $rfid->blocks( $tag );
hand it a $tag, get back a $blocks_arrayref. it's giving "here are the blocks, bestie." πΈ
afi
my $afi = $rfid->afi( $tag );
give it a $tag, it gives you the $afi. short, sweet, slays. β
to_hash
$self->to_hash( $tag );
turns your $tag situation into a hash. that's the whole thing. π
debug
$self->debug(1); # or more
crank up the debug level! 1 is a lil bit of debug, or go higher for # or more because sometimes you just need the whole group chat to know what's happening. πβ¨
from_reader
my $reader = $self->from_reader( $tag );
you hand over a $tag and it hands you back the $reader. reciprocal queen behavior. π
π PRIVATE π
these are the behind-the-scenes ones β iykyk, don't @ them from your app code unless you know what you're doing, bestie.
_invalidate_tag
$rfid->_invalidate_tag( $tag );
yep. it invalidates the tag. that's it, that's the tweet. π
_available
Probe each RFID reader supported and returns succefull ones
my $rfid_readers = Biblio::RFID::Reader->_available( $regex_filter );
it goes through every RFID reader it supports, probes them all, and hands back the ones that came through β the succefull ones. you can pass a $regex_filter too. β¨
π AUTOLOAD π
On any other function calls, we just marshall to all readers
translation: if you call literally any other function that isn't listed above, it just marshalls that call out to all the readers. chaotic? maybe. convenient? absolutely. π₯
π SEE ALSO π
RFID reader implementations
these are the actual reader implementations doing the heavy lifting, go show them some love:
Biblio::RFID::Reader::3M810Biblio::RFID::Reader::CPRM02Biblio::RFID::Reader::librfid
and that's the page, bestie!! ππ this was brought to you by perl v5.36.0, dated 2023-05-24, from the User Contributed Perl Documentation corner of the universe. stay slay, stay probed, and may all your readers be available. π¦β¨π
π¦ where this page comes from
- debian trixie: libbiblio-rfid-perl 0.05-1 Β· GPL-2.0-or-later
- ubuntu noble: libbiblio-rfid-perl 0.05-1 Β· GPL-2.0-or-later
- ubuntu resolute: libbiblio-rfid-perl 0.05-1 Β· GPL-2.0-or-later
- ubuntu stonking: libbiblio-rfid-perl 0.05-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms