ZMQ::FFI::Util(3pm)
π ZMQ::FFI::Util π
okay bestie so this is ZMQ::FFI::Util, a lil Perl module from the User Contributed Perl Documentation corner of the universe, and it's literally just a grab-bag of zmq convenience functions. that's it. that's the vibe. π¦
version 1.19 β yes queen, we're on 1.19, iconic behavior β¨
πΈ SYNOPSIS πΈ
here's how you actually use it, no cap:
use ZMQ::FFI::Util q(zmq_soname zmq_version)
my $soname = zmq_soname();
my ($major, $minor, $patch) = zmq_version($soname);
look at that. two functions. one import. we're serving β¨minimalismβ¨ and honestly? obsessed.
π FUNCTIONS π
π
zmq_soname([die => 0|1])
so this one is on a mission: it tries to load libzmq by looking for a platform-specific shared library file using FFI::CheckLib, with a fallback to Alien::ZMQ::latest. it's giving "i'll find your library, bestie, one way or another." π₯
it returns the name of the first one that was successful, or undef if nothing worked out. π
and if you're not the type to handle undef gracefully β like, if you'd rather things just blow up spectacularly β you can pass die => 1 and get exceptional behavior instead. dramatic. love that for you. π
π§ ($major, $minor, $patch) = zmq_version([$soname])
this one returns the libzmq version as the list ($major, $minor, $patch). three numbers. one list. slay. π
about that $soname β it can be either:
- a filename available in the ld cache, or
- the path to a library file
if $soname is not specified, it gets resolved using zmq_soname (the one from above, yes, the little detective one π).
β οΈ and if$sonamecannot be resolved,undefis returned. so like, check your values, bestie. don't come crying to me when you're dereferencing nothing. π
π SEE ALSO π
ZMQ::FFI
π AUTHOR π
Dylan Cali <calid1984@gmail.com>
(we stan. thank you for your service. π«Ά)
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2023 by Dylan Cali.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
so yeah β free as in go wild, just keep the same terms as Perl 5 itself. legal queen behavior. β
and that's the whole page, bestie!! no filler, no fluff, just two functions doing their little library-finding, version-reporting thing. this was documented under perl v5.36.0 on 2023-08-04, and that's a wrap πβ¨π β go forth and use ZMQ::FFI::Util, ily, bye!! π¦
π¦ where this page comes from
- debian trixie: libzmq-ffi-perl 1.19-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libzmq-ffi-perl 1.19-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libzmq-ffi-perl 1.19-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libzmq-ffi-perl 1.19-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms