Sys::Info::Base(3) Base class for Sys::Info

SYNOPSIS


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

DESCRIPTION

This document describes version 0.7804 of "Sys::Info::Base" released on "21 January 2015".

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".

AUTHOR

Burak Gursoy <[email protected]>.

COPYRIGHT

Copyright 2006 - 2015 Burak Gursoy. All rights reserved.

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.16.2 or, at your option, any later version of Perl 5 you may have available.