Sys::Info::Base
Contents
Copyright And License
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.
perl v5.36.0 2022-12-06 Sys::Info::Base(3pm)
Description
Includes some common methods.
Methods
load_moduleCLASS
Loads the module named with "CLASS".
load_subclassTEMPLATE
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".
trimSTRING
Returns the trimmed version of "STRING".
slurpFILE
Caches all contents of "FILE" into a scalar and then returns it.
read_fileFILE
Caches all contents of "FILE" into an array and then returns it.
date2timeDATE_STRING
Converts "DATE_STRING" into unix timestamp.
uname
Returns a hashref built from "POSIX::uname".
Name
Sys::Info::Base - Base class for Sys::Info
See Also
Sys::Info.
Synopsis
use base qw(Sys::Info::Base);
#...
sub foo {
my $self = shift;
my $data = $self->slurp("/foo/bar.txt");
}
Version
version 0.7807
