| 1 |
NAME |
| 2 |
Perl::osnames - List possible $^O ($OSNAME) values, with description |
| 3 |
|
| 4 |
VERSION |
| 5 |
This document describes version 0.122 of Perl::osnames (from Perl |
| 6 |
distribution Perl-osnames), released on 2020-02-13. |
| 7 |
|
| 8 |
DESCRIPTION |
| 9 |
This package contains $data which lists possible values of $^O along |
| 10 |
with description for each. It also provides some helper functions. |
| 11 |
|
| 12 |
Tags |
| 13 |
* unix |
| 14 |
|
| 15 |
Unix-like operating systems. This currently excludes beos/haiku. |
| 16 |
|
| 17 |
* bsd |
| 18 |
|
| 19 |
BSD-derived Unix operating systems. |
| 20 |
|
| 21 |
* sysv |
| 22 |
|
| 23 |
SysV-derived Unix operating systems. |
| 24 |
|
| 25 |
* posix |
| 26 |
|
| 27 |
For POSIX-compliant OSes, including fully-, mostly-, and |
| 28 |
largely-compliant ones (source: |
| 29 |
<http://en.wikipedia.org/wiki/POSIX>). |
| 30 |
|
| 31 |
From what I can gather, dec_osf is not POSIX compliant, although |
| 32 |
there is a posix package for it. |
| 33 |
|
| 34 |
VARIABLES |
| 35 |
None are exported by default, but they are exportable. |
| 36 |
|
| 37 |
$data |
| 38 |
An arrayref of records (arrayrefs), each structured as: |
| 39 |
|
| 40 |
[$name, \@tags, $description] |
| 41 |
|
| 42 |
$RE_OS_IS_KNOWN |
| 43 |
Current value: |
| 44 |
|
| 45 |
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/ |
| 46 |
|
| 47 |
$RE_OS_IS_POSIX |
| 48 |
Current value: |
| 49 |
|
| 50 |
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/ |
| 51 |
|
| 52 |
$RE_OS_IS_UNIX |
| 53 |
Current value: |
| 54 |
|
| 55 |
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/ |
| 56 |
|
| 57 |
FUNCTIONS |
| 58 |
None are exported by default, but they are exportable. |
| 59 |
|
| 60 |
is_posix([ $os ]) => bool |
| 61 |
Check whether $os (defaults to $^O if not specified) is POSIX (checked |
| 62 |
by the existence of "posix" tag on the OS's record in $data). Will |
| 63 |
return 0, 1, or undef if $os is unknown. |
| 64 |
|
| 65 |
is_unix([ $os ]) => bool |
| 66 |
Check whether $os (defaults to $^O if not specified) is Unix (checked by |
| 67 |
the existence of "unix" tag on the OS's record in $data). Will return 0, |
| 68 |
1, or undef if $os is unknown. |
| 69 |
|
| 70 |
HOMEPAGE |
| 71 |
Please visit the project's homepage at |
| 72 |
<https://metacpan.org/release/Perl-osnames>. |
| 73 |
|
| 74 |
SOURCE |
| 75 |
Source repository is at |
| 76 |
<https://github.com/perlancar/perl-Perl-osnames>. |
| 77 |
|
| 78 |
BUGS |
| 79 |
Please report any bugs or feature requests on the bugtracker website |
| 80 |
<https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-osnames> |
| 81 |
|
| 82 |
When submitting a bug or request, please include a test-file or a patch |
| 83 |
to an existing test-file that illustrates the bug or desired feature. |
| 84 |
|
| 85 |
SEE ALSO |
| 86 |
perlvar |
| 87 |
|
| 88 |
Config |
| 89 |
|
| 90 |
Perl::OSType, a core module. You should probably use this module |
| 91 |
instead. Currently the difference between this module and Perl::osnames: |
| 92 |
1) Perl::osnames currently doesn't list beos/haiku as Unix, but POSIX; |
| 93 |
2) Perl::osnames provides more tags (like sysv, bsd, posix) and |
| 94 |
description. |
| 95 |
|
| 96 |
Devel::Platform::Info |
| 97 |
|
| 98 |
The output of "perl -V" |
| 99 |
|
| 100 |
App::osnames, the original reason for Perl::osnames. With this CLI tool |
| 101 |
you can grep OS names by name, tag, or description, e.g. "osnames |
| 102 |
solaris" or "osnames posix". |
| 103 |
|
| 104 |
AUTHOR |
| 105 |
perlancar <[email protected]> |
| 106 |
|
| 107 |
COPYRIGHT AND LICENSE |
| 108 |
This software is copyright (c) 2020, 2014 by [email protected]. |
| 109 |
|
| 110 |
This is free software; you can redistribute it and/or modify it under |
| 111 |
the same terms as the Perl 5 programming language system itself. |
| 112 |
|