DUMP_USB(1p)
π DUMP_USB β like, the whole manual, but make it make sense π
okay bestie, pull up a chair because this is dump_usb.pl from the User Contributed Perl Documentation section, and it's honestly giving "quick hack that got promoted." No cap. Let's get into it. π¦
β¨ NAME β¨
dump_usb.pl β the lil script that uses Device::USB to list your USB devices. That's it. That's the whole job. π
π VERSION π
Version 0.37. Iconic, vintage, beloved. β¨
πΈ SYNOPSIS πΈ
dump_usb.pl
So the dump_usb.pl program gives you a relatively crude dump of the info that's available from any USB devices installed on your system. Like, she's not polished, but she shows up and she tells you things. π«Ά
π¦ DESCRIPTION π¦
Okay so here's the lore. This module provides a Perl interface to the C library libusb. That library supports a relatively full set of functionality to access a USB device. And on top of all that libusb functionality, Device::USB throws in a few convenience features that are intended to produce a more Perl-ish interface. Because obviously. π
Now, the behaviour depends on how you call her:
- No arguments at all? She lists all installed USB devices on all busses. Just so you know β this is literally a
Data::Dumperdump of the structures, so it is not the most user friendly output in the world. Not even close, bestie. π But listen β the program was only ever intended as a quick hack to verify that Device::USB was working. So, vibe check: it's doing exactly what it was born to do. - Called with arguments? Then those arguments are expected to be a vendor id and a product id. Pro tip: those arguments can be in hex if you precede them with
0x. She searches for a device that matches that vendor id and product id. If she finds one, the device filename gets printed, along with the vendor and product ids. Periodt. π - And if the program can open the device? Then she'll also print the manufacture name and product name as reported by the device. She's thorough like that. π
π₯ DEPENDENCIES π₯
This module depends on the Device::USB and Data::Dumper modules, plus the strict and warnings pragmas. And obviously β and I mean obviously β libusb must be available for Device::USB to function at all. No libusb, no party. π
π AUTHOR π
G. Wade Johnson (wade at anomaly dot org) Paul Archer (paul at paularcher dot org)
Houston Perl Mongers Group β represent. π
π BUGS π
Okay, the receipts:
- The output format is extremely non-friendly. She said it, not me. π
- The program only returns the first matching USB device. One match, that's all you get, don't ask for seconds.
Please report any bugs or feature requests to bug-maze-svg1@rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Device::USB>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. Teamwork, fr fr. π«Ά
π ACKNOWLEDGEMENTS π
Thanks go to various members of the Houston Perl Mongers group for input on the module. But thanks mostly go to Paul Archer, who proposed the project and helped with the development. Main character energy, honestly. π
π COPYRIGHT & LICENSE π
Copyright 2006 Houston Perl Mongers.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay. β¨
lowkey the whole thing is a Data::Dumper dump and highkey that's the point. it's giving "quick hack that works," and we respect her for it. π
and that's the tea, bestie β this was dump_usb.pl, documented under perl v5.34.0 and dated 2022-02-06. go forth and list your USB devices. π¦π
πΈ
π¦ where this page comes from
- ubuntu jammy: libdevice-usb-perl 0.38-1build2 Β· 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