Devel::...Srelease(3)

πŸ“¦
version 2.40.0 Β· 3 versions
, in opensuse-leap 16.0

πŸ’– NAME πŸ’–

Devel::CheckOS::Helpers::LinuxOSrelease β€” functions to deal with /etc/os-release file. Okay bestie, this page is Devel::...Srelease(3) from the User Contributed Perl Documentation, and we are so ready πŸ’…βœ¨


✨ SYNOPSIS ✨

Here’s the whole vibe, no cap:

use Devel::CheckOS::Helpers::LinuxOSrelease 'distributor_id';
my $id = distributor_id;

🌸 DESCRIPTION 🌸

This module exports functions to handle text files related to Debian-like distributions. Short, sweet, iconic πŸŽ€


πŸ‘‘ EXPORTED πŸ‘‘

The following subs are exported, periodt:

πŸ¦‹ distributor_id πŸ¦‹

Retrieves and returns the distributor ID from the /etc/os-release file.

It’s expected that the file exists, is readable, and has this (minimum) content format:

NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"

This excerpt is from Ubuntu 22.04, but other distributions might have fewer, more or different fields and values. Every distro has its own main character energy, fr fr 🌈

It returns the value of ID, or undef, if the conditions are not those specified above.


Copyright 2024 David Cantrell

This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It’s up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.


That’s the whole page, bestie 🫢 β€” it comes from perl v5.42.0, dated 2024-06-23, with the footer title Devel::...Srelease(3). Slay πŸ’‹

πŸ“¦ where this page comes from