Sys::Info::Base(3pm)

Sys::Info::Base3pm

Base class for sys::info

Usage

    use base qw(Sys::Info::Base);
    #...
    sub foo {
        my $self = shift;
        my $data = $self->slurp("/foo/bar.txt");
    }

Version

version 0.7807

Overview

Includes some common methods.

Methods

load_module CLASS

Loads the module named with "CLASS".

load_subclass TEMPLATE

Loads the specified class via "TEMPLATE":

    my $class = __PACKAGE__->load_subclass('Sys::Info::Driver::%s::OS');

%s will be replaced with "OSID". Apart from the template usage, it is the same as "load_module".

trim STRING

Returns the trimmed version of "STRING".

slurp FILE

Caches all contents of "FILE" into a scalar and then returns it.

read_file FILE

Caches all contents of "FILE" into an array and then returns it.

date2time DATE_STRING

Converts "DATE_STRING" into unix timestamp.

uname

Returns a hashref built from "POSIX::uname".

Releases

6 releases since Debian 8 (Jessie); the text changed 4 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12–13

Author

Burak Gursoy <[email protected]>

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