1Devel::AssertOS(3) User Contributed Perl Documentation Devel::AssertOS(3)
2
3
4
6 Devel::AssertOS - require that we are running on a particular OS
7
9 Devel::AssertOS is a utility module for Devel::CheckOS and
10 Devel::AssertOS::*. It is nothing but a magic import() that lets you
11 do this:
12
13 use Devel::AssertOS qw(Linux FreeBSD Cygwin);
14
15 which will die unless the platform the code is running on is Linux,
16 FreeBSD or Cygwin.
17
18 To assert that the OS is not a specific platform, prepend the platform
19 name with a minus sign. For example, to run on anything but Amiga, do:
20
21 use Devel::AssertOS qw(-Amiga);
22
24 I welcome feedback about my code, including constructive criticism.
25 Bug reports should be made using
26 <https://github.com/DrHyde/perl-modules-Devel-CheckOS/issues>.
27
28 You will need to include in your bug report the exact value of $^O,
29 what the OS is called (eg Windows Vista 64 bit Ultimate Home Edition),
30 and, if relevant, what "OS family" it should be in and who wrote it.
31
32 If you are feeling particularly generous you can encourage me in my
33 open source endeavours by buying me something from my wishlist:
34 <http://www.cantrell.org.uk/david/wishlist/>
35
37 $^O in perlvar
38
39 perlport
40
41 Devel::CheckOS
42
43 Devel::AssertOS::Extending
44
45 The use-devel-assertos script
46
47 Module::Install::AssertOS
48
50 David Cantrell <david@cantrell.org.uk>
51
52 Thanks to David Golden for suggesting that I add this utility module.
53
55 Copyright 2023 David Cantrell
56
57 This software is free-as-in-speech software, and may be used,
58 distributed, and modified under the terms of either the GNU General
59 Public Licence version 2 or the Artistic Licence. It's up to you which
60 one you use. The full text of the licences can be found in the files
61 GPL2.txt and ARTISTIC.txt, respectively.
62
64 This module is also free-as-in-mason software.
65
66
67
68perl v5.36.0 2023-02-05 Devel::AssertOS(3)