Abe Timmerman > Test-Smoke > Test::Smoke::SysInfo

Download:
Test-Smoke-1.70.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  15
Open  4
Stalled  1
View/Report Bugs
Module Version: 0.043   Source   Latest Release: Test-Smoke-1.70_02

NAME ^

Test::Smoke::SysInfo - Factory for system specific information objects

SYNOPSIS ^

    use Test::Smoke::SysInfo;

    my $si = Test::Smoke::SysInfo->new;

    printf "Hostname: %s\n", $si->host;
    printf "Number of CPU's: %s\n", $si->ncpu;
    printf "Processor type: %s\n", $si->cpu_type;   # short
    printf "Processor description: %s\n", $si->cpu; # long
    printf "OS and version: %s\n", $si->os;

or

    use Test::Smoke::SysInfo qw( sysinfo );
    printf "[%s]\n", sysinfo();

or

    $ perl -MTest::Smoke::SysInfo=tsuname -le print+tsuname

DESCRIPTION ^

Sometimes one wants a more eleborate description of the system one is smoking.

METHODS ^

Test::Smoke::SysInfo->new( )

Factory method, with fallback to the information in POSIX::uname().

sysinfo( )

sysinfo() returns a string with host, os and cpu_type.

tsuname( @args )

This class gathers most of the uname(1) info, make a comparable version. 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

SEE ALSO ^

Test::Smoke::Smoker, Test::Smoke::Reporter

COPYRIGHT ^

(c) 2002-2013, Abe Timmerman <abeltje@cpan.org> All rights reserved.

With contributions from Jarkko Hietaniemi, Merijn Brand, 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.

syntax highlighting: