Sys::Info(3pm)

Sys::Info3pm

Fetch information from the host system

Usage

    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;

Version

version 0.7811

Overview

Extracts and collects information from the host system.

Methods

new

Constructor.

os

Creates and returns an instance of a Sys::Info::OS object. See Sys::Info::OS for available methods.

device

Creates and returns an instance of the specified device's object. See Sys::Info::Device for more information.

perl

Returns the perl version in the version number format (i.e.: 5.8.8). This is also true for legacy perls (i.e.: 5.005_03 will be 5.5.3)

perl_build

Returns the ActivePerl build number if code is used under Windows with ActivePerl. Returns zero otherwise.

perl_long

This method is just a combination of "perl" & "perl_build".

httpd

If the code is used under a HTTP server and this server is recognised, returns the name of this server. Returns "undef" otherwise.

Constants

Osid

Returns the OS identifier.

Releases

3 releases since Debian 11 (Bullseye); the text changed 1 time.

  1. 11
  2. 12–13

Author

Burak Gursoy <[email protected]>

From libsys-info-perl 0.7811-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.