Devel::AssertOS(3)
π Devel::AssertOS(3) β like, the manual page, bestie
okay so this is the Devel::AssertOS(3) page from the User Contributed Perl Documentation section, and honestly? it's a little baddie. let's get into it π
β¨ NAME β¨
Devel::AssertOS β require that we are running on a particular OS πΈ
π¦ DESCRIPTION π¦
Devel::AssertOS is a utility module for Devel::CheckOS and Devel::AssertOS::*. and when I say utility I mean it is nothing but a magic import(). that's it. that's the whole girl. no cap. π
and what does that magic import() let you do? this:
use Devel::AssertOS qw(Linux FreeBSD Cygwin);
which will die π unless the platform the code is running on is Linux, FreeBSD or Cygwin. dramatic? yes. correct? also yes. π₯
now, say you wanna assert the opposite β that the OS is not a specific platform. you just prepend the platform name with a minus sign -. iconic little trick honestly. for example, to run on anything but Amiga, do:
use Devel::AssertOS qw(-Amiga);
that's it. go off. β¨
π BUGS and FEEDBACK π
I welcome feedback about my code, including constructive criticism π«Ά (yes really, be nice but be honest).
Bug reports should be made using <https://github.com/DrHyde/perl-modules-Devel-CheckOS/issues> π¬
You will need to include in your bug report the exact value of $^O, what the OS is called (eg Windows Vista 64 bit Ultimate Home Edition), and, if relevant, what "OS family" it should be in and who wrote it. give me all the lore, bestie π
and if you are feeling particularly generous you can encourage me in my open source endeavours by buying me something from my wishlist: <http://www.cantrell.org.uk/david/wishlist/> π
π SEE ALSO π
$^Oin perlvar- perlport
- Devel::CheckOS
- Devel::AssertOS::Extending
- The use-devel-assertos script
- Module::Install::AssertOS
iykyk π
π AUTHOR π
David Cantrell <david@cantrell.org.uk>
Thanks to David Golden for suggesting that I add this utility module. absolute king behaviour, we love to see it π«‘β¨
π COPYRIGHT and LICENCE π
Copyright 2024 David Cantrell
This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. read the fine print, bestie, it's giving responsible π
π§ CONSPIRACY π§
This module is also free-as-in-mason software.
like, don't ask. it's a vibe. π§±π
and that's the whole page, fr fr β this was Devel::AssertOS(3) from perl v5.42.0, dated 2024-06-23. slay, go assert some OSes responsibly πβπ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Devel-CheckOS 2.40.0-bp160.1.11 Β· Artistic-1.0 OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms