DOKK / manpages / debian 11 / libsys-info-perl / Sys::Info.3pm.en
Sys::Info(3pm) User Contributed Perl Documentation Sys::Info(3pm)

Sys::Info - Fetch information from the host system

version 0.7811

    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;

Extracts and collects information from the host system.

Constructor.

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

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

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)

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

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

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

OSID

Returns the OS identifier.

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

Burak Gursoy <burak@cpan.org>

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.

2019-11-01 perl v5.30.0