Perl::osnames(3pm)
π NAME π
Perl::osnames β it lists every possible value of $^O (aka $OSNAME) with a lil description for each one. Also hi, this is the Perl::osnames(3pm) page from the User Contributed Perl Documentation, and yes you're in the right place bestie π«Ά
β¨ VERSION β¨
This doc describes version 0.122 of Perl::osnames (it ships in the Perl distribution Perl-osnames), and it was released on 2020-02-13. Obsessed with the sheer history of it π
π DESCRIPTION π
okay so. This package contains $data, which is basically the guest list: it lists possible values of $^O and a description for each one. It also hands you some helper functions, which is giving very generous of it π
π·οΈ Tags
unixβ Unix-like operating systems. Heads up tho: right now this one does not includebeos/haiku. Not them being left out πbsdβ BSD-derived Unix operating systems. periodt.sysvβ SysV-derived Unix operating systems.posixβ For POSIX-compliant OSes, and that means the fully-, mostly-, and largely-compliant girlies (source:http://en.wikipedia.org/wiki/POSIX). From what I can gather,dec_osfis not POSIX compliant, although there is aposixpackage for it. the way that's so uncomfy π
π VARIABLES π
None are exported by default, but they are exportable. (Say it with me: none by default, exportable on request β¨)
$data
An arrayref of records (and each record is itself an arrayref), structured exactly like this:
[$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. (same energy as the variables, no cap π)
is_posix([ $os ]) => bool
Check whether $os is POSIX β and if you don't pass $os, it defaults to $^O. How does it check? By whether the posix tag exists on that OS's record inside $data. It'll return 0, 1, or undef if $os is unknown π
is_unix([ $os ]) => bool
Check whether $os is Unix β again, defaults to $^O if you don't pass $os. This one checks by whether the unix tag exists on that OS's record inside $data. Returns 0, 1, or undef if $os is unknown. Same vibe, different tag πΈ
π₯ HOMEPAGE π₯
Come visit the project's homepage at https://metacpan.org/release/Perl-osnames β it's literally right there π
π¦ SOURCE π¦
The source repository lives at https://github.com/perlancar/perl-Perl-osnames. Go off, clone it π
π BUGS π
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-osnames
When you submit a bug or a request, please include a test-file, or a patch to an existing test-file, that illustrates the bug or the feature you want. fr fr, it helps so much π
π SEE ALSO π
perlvarConfigPerl::OSType, a core module. You should probably use this module instead. Currently the difference between this module andPerl::osnamesis: 1)Perl::osnamescurrently doesn't listbeos/haikuas Unix, but POSIX; 2)Perl::osnamesprovides more tags (likesysv,bsd,posix) and description.Devel::Platform::Info- The output of
perl -V App::osnames, the original reason forPerl::osnames. With this CLI tool you can grep OS names by name, tag, or description, e.g.osnames solarisorosnames posix. iconic behavior honestly π
π AUTHOR π
perlancar <perlancar@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2020, 2014 by perlancar@cpan.org.
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 whole page bestie!! this one was generated by perl v5.36.0 on 2022-10-16, so go forth and grep your OS names, slay, drink water, and remember: $^O is just a string and you are the main character πβ¨π¦
π¦ where this page comes from
- ubuntu noble: libperl-osnames-perl 0.122-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libperl-osnames-perl 0.122-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libperl-osnames-perl 0.122-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms