Perl::osnames(3pm)

Perl::osnames3pm

List possible $^o ($osname) values, with description

Version

This document describes version 0.122 of Perl::osnames (from Perl distribution Perl-osnames), released on 2020-02-13.

Overview

This package contains $data which lists possible values of $^O along with description for each. It also provides some helper functions.

Tags

•

unix

Unix-like operating systems. This currently excludes beos/haiku.

•

bsd

BSD-derived Unix operating systems.

•

sysv

SysV-derived Unix operating systems.

•

posix

For POSIX-compliant OSes, including fully-, mostly-, and largely-compliant ones (source: <http://en.wikipedia.org/wiki/POSIX>).

From what I can gather, dec_osf is not POSIX compliant, although there is a posix package for it.

Variables

None are exported by default, but they are exportable.

$data

An arrayref of records (arrayrefs), each structured as:

 [$name, \@tags, $description]

$re_os_is_known

Current value:

 qr/\A(?:aix|amigaos|android|bsdos|beos|bitrig|dgux|dos|dynixptx|cygwin|darwin|dec_osf|dragonfly|freebsd|gnu|gnukfreebsd|haiku|hpux|interix|iphoneos|irix|linux|MacOS|machten|midnightbsd|minix|mirbsd|mpeix|msys|MSWin32|netbsd|next|nto|openbsd|os2|os390|os400|posix-bc|qnx|riscos|sco|sco_sv|solaris|sunos|svr4|svr5|unicos|unicosmk|vmesa|VMS|vos)\z/

$re_os_is_posix

Current value:

 qr/\A(?:aix|beos|cygwin|darwin|dragonfly|freebsd|gnu|gnukfreebsd|haiku|hpux|interix|iphoneos|irix|linux|midnightbsd|minix|mirbsd|msys|netbsd|openbsd|sco|sco_sv|solaris|sunos|svr4|svr5|unicos|unicosmk)\z/

$re_os_is_unix

Current value:

 qr/\A(?:aix|android|bsdos|bitrig|dgux|dynixptx|cygwin|darwin|dragonfly|freebsd|gnu|gnukfreebsd|hpux|interix|iphoneos|irix|linux|machten|midnightbsd|mirbsd|msys|netbsd|next|nto|openbsd|qnx|sco|sco_sv|solaris|sunos|svr4|svr5|unicos|unicosmk)\z/

Functions

None are exported by default, but they are exportable.

is_posix([ $os ]) => bool

Check whether $os (defaults to $^O if not specified) is POSIX (checked by the existence of "posix" tag on the OS's record in $data). Will return 0, 1, or undef if $os is unknown.

is_unix([ $os ]) => bool

Check whether $os (defaults to $^O if not specified) is Unix (checked by the existence of "unix" tag on the OS's record in $data). Will return 0, 1, or undef if $os is unknown.

Homepage

Please visit the project's homepage at <https://metacpan.org/release/Perl-osnames>.

Source

Source repository is at <https://github.com/perlancar/perl-Perl-osnames>.

Releases

5 releases since Debian 9 (Stretch); the text changed 2 times.

  1. 9–10
  2. 11
  3. 12–13

Bugs

Please report any bugs or feature requests on the bugtracker website <https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-osnames>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

Author

perlancar <[email protected]>

From libperl-osnames-perl 0.122-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.