1Sys::Info::Base(3)    User Contributed Perl Documentation   Sys::Info::Base(3)
2
3
4

NAME

6       Sys::Info::Base
7

VERSION

9       version 0.7807
10

SYNOPSIS

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

DESCRIPTION

20       Includes some common methods.
21

NAME

23       Sys::Info::Base - Base class for Sys::Info
24

METHODS

26   load_module CLASS
27       Loads the module named with "CLASS".
28
29   load_subclass TEMPLATE
30       Loads the specified class via "TEMPLATE":
31
32           my $class = __PACKAGE__->load_subclass('Sys::Info::Driver::%s::OS');
33
34       %s will be replaced with "OSID". Apart from the template usage, it is
35       the same as "load_module".
36
37   trim STRING
38       Returns the trimmed version of "STRING".
39
40   slurp FILE
41       Caches all contents of "FILE" into a scalar and then returns it.
42
43   read_file FILE
44       Caches all contents of "FILE" into an array and then returns it.
45
46   date2time DATE_STRING
47       Converts "DATE_STRING" into unix timestamp.
48
49   uname
50       Returns a hashref built from "POSIX::uname".
51

SEE ALSO

53       Sys::Info.
54

AUTHOR

56       Burak Gursoy <burak@cpan.org>
57
59       This software is copyright (c) 2006 by Burak Gursoy.
60
61       This is free software; you can redistribute it and/or modify it under
62       the same terms as the Perl 5 programming language system itself.
63
64
65
66perl v5.38.0                      2023-07-21                Sys::Info::Base(3)
Impressum