Sys::Info(3pm)

πŸ“¦
version 0.7811 Β· 2 versions
  • 0.7811 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.7811 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Sys::Info β€” the manual, but make it cute πŸ’–

okay so bestie, this is Sys::Info, a Perl module that lives in the User Contributed Perl Documentation corner of your man pages, and it does exactly one iconic thing: it goes and fetches info from the host system. that's the whole vibe. no cap.


✨ VERSION ✨

this is version 0.7811. periodt.


🌸 SYNOPSIS 🌸

here's the lil taste test, copy it exactly bestie:

use Sys::Info;
my $info = Sys::Info->new;
printf "Perl version is %s\n", $info->perl;
if(my $httpd = $info->httpd) {
    print "HTTP Server is $httpd\n";
}
my $cpu = $info->device('CPU');
my $os  = $info->os;
printf "Operating System is %s\n", $os->name( long => 1 );
printf "CPU: %s\n", scalar $cpu->identify;

like… she's serving. look at her go. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

she extracts and collects information from the host system. that's it, that's the job, and she does it flawlessly. it's giving little detective. πŸ”βœ¨


πŸŽ€ METHODS πŸŽ€

πŸ’œ new

the constructor. the birth. the main character entrance. 🌟

🌈 os

creates and returns an instance of a Sys::Info::OS object. peep Sys::Info::OS for all the methods you can call on her.

πŸ“ device

creates and returns an instance of the object for whichever device you asked for. more deets live in Sys::Info::Device. 🫢

⭐ perl

returns the perl version in version number format, like 5.8.8. and yes bestie, this holds for the legacy perls too β€” 5.005_03 comes back as 5.5.3. no she did not stutter. πŸ’€

🌸 perl_build

returns the ActivePerl build number if the code is running under Windows with ActivePerl. any other time? returns zero. that's it. that's the whole personality. πŸ™ˆ

🧚 perl_long

this one is literally just perl and perl_build holding hands. a combination. iconic duo behavior. πŸ‘‘

πŸŽ€ httpd

if the code is running under a HTTP server and that server is one she recognises, she returns the name of that server. otherwise? undef. she's not gonna guess, bestie, she's gonna be honest. 😭


πŸ‘‘ CONSTANTS πŸ‘‘

πŸ’… OSID

returns the OS identifier. that's the whole thing. slay. ✨


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, in order, exactly as they appear on the original guest list:

Sys::Info::Base, Sys::Info::OS, Sys::Info::Device, Filesys::Ext2, Filesys::Statvfs, Filesys::Type Filesys::DiskFree, Filesys::DiskSpace, Filesys::DiskUsage, Linux::Distribution, Linux::Distribution::Packages, Probe::MachineInfo, Sys::CPU, Sys::CpuLoad, Sys::Filesystem, Sys::HostIP, Sys::Hostname::FQDN, Sys::Load, Sys::MemInfo, Sys::Uptime, Unix::Processors, Win32::SystemInfo, Win32, Win32API::File, Win32API::Net, Win32::OLE, Win32::TieRegistry

go say hi. they're all lovely. 🫢🌸


πŸ’œ AUTHOR πŸ’œ

Burak Gursoy <burak@cpan.org>. the legend herself. we stan. πŸ‘‘


This software is copyright (c) 2006 by Burak Gursoy.

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 like… go wild, remix it, redistribute it, it's free bestie, same terms as Perl 5 itself. 🫢

and that's the whole page, bestie!! πŸ’– this one was rendered by perl v5.34.0 on 2022-06-05 β€” mwah, no notes, she ate and left zero crumbs. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from