System...::Base(3pm)

πŸ’– System::Info::Base πŸ’–

okay so bestie, welcome to System::Info::Base β€” the literal baseclass for system information, from the User Contributed Perl Documentation collection. she's the mom of the family, the one all the platform-specific subclasses inherit their whole vibe from. πŸŽ€


✨ NAME ✨

System::Info::Base β€” Baseclass for system information. periodt.


πŸ¦‹ ATTRIBUTES πŸ¦‹

these are the little fields she's holding onto, bestie:

  • cpu
  • cpu_type
  • ncpu
  • os
  • host

🌸 DESCRIPTION 🌸

πŸ’… System::Info::Base->new()

spins up a brand new instance for $^O. main character entrance fr fr. ✨

🧚 $si->prepare_sysinfo

this one is like... meant to be overridden by platform specific subclasses. like she's giving you the template and the subclasses do the actual homework, iykyk.

the generic information gets taken from POSIX::uname():

$self->_hostname  => (POSIX::uname)[1]
$self->_os        => join " - " => (POSIX::uname)[0,2]
$self->_osname    => (POSIX::uname)[0]
$self->_osvers    => (POSIX::uname)[2]
$self->_cpu_type  => (POSIX::uname)[4]
$self->_cpu       => (POSIX::uname)[4]
$self->_cpu_count => ""

(that last one is literally an empty string, no cap, she said "we'll figure out the count later". 😭)

πŸŽ€ $si->get_os

Returns $self->_os. that's it, that's the whole thing. iconic.

🩷 $si->get_hostname

Returns $self->_hostname. πŸ’–

⭐ $si->get_cpu_type

Returns $self->_cpu_type.

πŸ”₯ $si->get_cpu

Returns $self->_cpu.

πŸ‘‘ $si->get_cpu_count

Returns $self->_cpu_count.

🌈 $si->get_core_count

Returns $self->get_cpu_count as a number. not the string, bestie, the number. she's asking for digits.

so like, if get_cpu_count returns "2 [8 cores]", then get_core_count returns 8. the math is mathing. ✨

πŸ¦‹ $si->get_dist_name

Returns the name of the distribution. yes queen, tell us what distro you're on.

πŸ“ si_uname (@args)

this class gathers most of the uname(1) info and makes a comparable version of it. takes almost the same arguments:

a for all (can be omitted)
n for nodename
s for os name and version
m for cpu name
c for cpu count
p for cpu_type

πŸ™ˆ $si->old_dump

just a backward compatible way to dump the object (for test suite). legacy behavior but make it cute. 🫢


(c) 2016-2026, Abe Timmerman & H.Merijn Brand, All rights reserved.

With contributions from Jarkko Hietaniemi, Campo Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, Rich Rauenzahn, David Cantrell.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See:

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. bestie. no promises. πŸ’€

and that's the whole page, mwah πŸ’‹ β€” this lil rewrite was served to you by perl v5.40.1, dated 2026-01-25, and the manual name up top is System...::Base(3pm). go off, queen. πŸ‘‘βœ¨

πŸ“¦ where this page comes from