Rex::Co...ventory(3)
π Rex::Commands::Inventory β get an inventory of your systems π
okay so this page lives in the User Contributed Perl Documentation manual, section 3 (that's the Rex::Co...ventory(3) line up top, the title got squished by the terminal, iykyk). Bestie, it's honestly a small one and I'm obsessed with how chill it is.
β¨ NAME β¨
Rex::Commands::Inventory β literally just here to hand you an inventory of your systems π«Ά
π¦ DESCRIPTION π¦
With this module you can get an inventory of your system. That's the whole vibe. No cap.
A couple things you should know, and I'm being serious for one sec: all these functions will not be reported. Like, they don't show up in the reporting, okay? And they don't modify anything β they're read-only, they're the friend who comes over and doesn't touch your stuff π
πΈ SYNOPSIS πΈ
use Data::Dumper;
task "inventory", "remoteserver", sub {
my $inventory = inventory();
print Dumper($inventory);
};
That's the whole flow: pull the Data::Dumper module in, define a task called "inventory" that runs on "remoteserver", grab the inventory, dump it, and let it slay β¨
π EXPORTED FUNCTIONS π
π inventory
This function returns a hashref of all the gathered hardware. That's it, that's the function, main character energy fr fr. To actually see the structure, you use the Data::Dumper module β otherwise you're just staring at a hashref like π
task "get_inventory", sub {
my $inventory = inventory();
print Dumper($inventory);
};
π reminder: this function will not be reported, and it does not modify anything. Pure vibes, zero side effects.
and that's the page bestie, no more sections, go dump some hashes π¦π
sign-off time π β this little icon was brought to you by perl v5.42.3, dated 2023-08-05, from the User Contributed Perl Documentation collection. periodt β¨π
π¦ where this page comes from
- nixos 26.05: perl5.42.3-Rex 1.14.3
- nixpkgs unstable: perl5.42.3-Rex 1.14.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms