Rex::Hardware(3pm)
β¨ NAME β¨
Rex::Hardware β the glow-up base class for all your hardware / information gathering needs π
it's giving "I ask the machine questions and the machine answers" energy, fr fr.
πΈ DESCRIPTION πΈ
okay so bestie, lowkey this is the base class for hardware/information gathering. that's it, that's the vibe β everything else in the hardware-gathering family descends from this queen π. she doesn't do the gathering herself, she's the blueprint. main character energy only.
π¦ SYNOPSIS π¦
use Rex::Hardware;
my %host_info = Rex::Hardware->get(qw/ Host /);
my %all_info = Rex::Hardware->get(qw/ All /);
see how easy?? <italic>use</italic> it, then call <italic>get</italic> and boom π₯ β a hash of info is yours. that's the whole plot.
π CLASS METHODS π
π get(@modules)
Returns a hash with the wanted information. literally just tell it which modules you want and it hands you the goods, no cap π
task "get-info", "server1", sub {
%hw_info = Rex::Hardware->get(qw/ Host Network /);
};
asking for exactly <italic>Host</italic> and <italic>Network</italic>?? iconic, selective, we love a girl who knows what she wants β¨
Or if you want to get all information:
task "get-all-info", "server1", sub {
%hw_info = Rex::Hardware->get(qw/ All /);
};
the <italic>All</italic> glutton route π β she said "give me everything", and honestly? valid.
π Available modules:
HostKernelMemoryNetworkSwapVirtInfo
six little modules, six little slays, pick your faves and go π«Ά
and that's the whole page bestie, no notes π this gem came to you courtesy of perl v5.40.1, dated 2025-10-03, part of the User Contributed Perl Documentation collection β go gather you some hardware info, you absolute icon πβ¨
π¦ where this page comes from
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms