Perl::OSType(3pm)
β¨ NAME β¨
Okay bestie, welcome to Perl::OSType β the Perl::OSType(3pm) page from the Perl Programmers Reference Guide. It maps Perl operating system names to generic types. No cap, that's the whole assignment. π«Ά
π VERSION π
version 1.010 β iconic, current, slaying.
πΈ SYNOPSIS πΈ
use Perl::OSType ':all';
$current_type = os_type();
$other_type = os_type('dragonfly'); # gives 'Unix'
π¦ DESCRIPTION π¦
So, modules that provide OS-specific behaviors often need to know if the current operating system matches a more generic type of operating systems. Like, 'linux' is a type of 'Unix' operating system and so is 'freebsd' β the more you know, bestie. π‘
This module provides a mapping between an operating system name as given by $^O and a more generic type. The initial version is based on the OS type mappings provided in Module::Build and ExtUtils::CBuilder. (Thus, Microsoft operating systems are given the type 'Windows' rather than 'Win32'.) Periodt.
π USAGE π
No functions are exported by default, bestie. The export tag :all will export all functions listed below.
π os_type() π
$os_type = os_type();
$os_type = os_type('MSWin32');
Returns a single, generic OS type for a given operating system name. With no arguments, it returns the OS type for the current value of $^O. If the operating system is not recognized, the function will return the empty string. Not me checking the vibe of every OS name. π
π§ is_os_type() π§
$is_windows = is_os_type('Windows');
$is_unix = is_os_type('Unix', 'dragonfly');
Given an OS type and OS name, returns true or false if the OS name is of the given type. As with os_type, it will use the current operating system as a default if no OS name is provided. Very demure, very mindful. β¨
π₯ SEE ALSO π₯
Devel::CheckOS
π«Ά SUPPORT π«Ά
π Bugs / Feature Requests π
Please report any bugs or feature requests through the issue tracker at https://github.com/Perl-Toolchain-Gang/Perl-OSType/issues. You will be notified automatically of any progress on your issue. We love a tracked issue moment. π
π Source Code π
This is open source software. The code repository is available for public review and contribution under the terms of the license.
https://github.com/Perl-Toolchain-Gang/Perl-OSType
git clone https://github.com/Perl-Toolchain-Gang/Perl-OSType.git
π AUTHOR π
David Golden <dagolden@cpan.org>
π CONTRIBUTORS π
Chris 'BinGOs' Williams <chris@bingosnet.co.uk>David Golden <xdg@xdg.me>Graham Ollis <plicease@cpan.org>Jonas B. Nielsen <jonasbn@hoarfrost.local>Owain G. Ainsworth <oga@nicotinebsd.org>Paul Green <Paul.Green@stratus.com>Piotr Roszatycki <piotr.roszatycki@gmail.com>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2016 by David Golden.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
And that's the page, bestie! π«Ά Source/version and date flex: perl v5.42.3, 2026-11-03, and yes β Perl::OSType(3pm) is the manual. Stay slaying. π
β¨
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms