Perl::osnames(3pm)

πŸ“¦
version 0.122 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 include beos/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_osf is not POSIX compliant, although there is a posix package 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 πŸ‘€

  • perlvar
  • Config
  • Perl::OSType, a core module. You should probably use this module instead. Currently the difference between this module and Perl::osnames is: 1) Perl::osnames currently doesn't list beos/haiku as Unix, but POSIX; 2) Perl::osnames provides more tags (like sysv, bsd, posix) and description.
  • Devel::Platform::Info
  • The output of perl -V
  • App::osnames, the original reason for Perl::osnames. With this CLI tool you can grep OS names by name, tag, or description, e.g. osnames solaris or osnames posix. iconic behavior honestly πŸŽ€

🌟 AUTHOR 🌟

perlancar <perlancar@cpan.org>


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