NAME
Sys::OsRelease - read operating system details from FreeDesktop.Org standard /etc/os-release file
VERSION
version 0.0.1
SYNOPSIS
non-object-oriented: Sys::OsRelease->init(); my $id = Sys::OsRelease->id(); my $id_like = Sys::OsRelease->id_like();
object-oriented: my $osrelease = Sys::OsRelease->instance(); my $id = $osrelease->id(); my $id_like = $osrelease->id_like();
DESCRIPTION
Sys::OsRelease is a helper library to read the /etc/os-release file, as defined by FreeDesktop.Org. The os-release file is used to define an operating system environment. It was started on Linux systems which use the systemd software, but then spread to other Linux, BSD and Unix-based systems. Its purpose is to identify the system to any software which needs to know. It differentiates between Unix-based operating systems and even between Linux distributions.
Sys::OsRelease is implemented with a singleton model, meaning there is only one instance of the class. Instead of instantiating an object with new(), the instance() class method returns the one and only instance. The first time it's called, it instantiates it. On following calls, it returns a reference to the existing instance.
This module maintains minimal prerequisites, and only those which are usually included with Perl. (Suggestions of new features and code will largely depend on following this rule.) That it intended to make it acceptable for establishing system or container environments which contain Perl programs. It can also be used for installing or configuring software that needs to know about the system environment.
NAME
Sys::OsRelease - read operating system details from FreeDesktop.Org standard /etc/os-release file
SEE ALSO
FreeDesktop.Org's os-release standard: https://www.freedesktop.org/software/systemd/man/os-release.html
GitHub repository for Sys::OsRelease: https://github.com/ikluft/Sys-OsRelease
BUGS AND LIMITATIONS
Please report bugs via GitHub at https://github.com/ikluft/Sys-OsRelease/issues
Patches and enhancements may be submitted via a pull request at https://github.com/ikluft/Sys-OsRelease/pulls
LICENSE INFORMATION
Copyright (c) 2022 by Ian Kluft
This module is distributed in the hope that it will be useful, but it is provided “as is” and without any express or implied warranties. For details, see the full text of the license in the file LICENSE or at https://www.perlfoundation.org/artistic-license-20.html.
AUTHOR
Ian Kluft <https://github.com/ikluft>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2022 by Ian Kluft.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)