line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::AssertOS::Unix; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
791
|
use Devel::CheckOS; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
209
|
|
4
|
5
|
|
|
5
|
|
25
|
use strict; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
91
|
|
5
|
5
|
|
|
5
|
|
20
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
147
|
|
6
|
5
|
|
|
5
|
|
20
|
no warnings 'redefine'; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
774
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.6'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# list of OSes originally lifted from Module::Build 0.2808 |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
sub matches { |
13
|
11
|
|
|
11
|
0
|
105
|
return qw( |
14
|
|
|
|
|
|
|
AIX Android Bitrig BSDOS DGUX DragonflyBSD Dynix FreeBSD HPUX Hurd |
15
|
|
|
|
|
|
|
Interix iOS Irix Linux MachTen MacOSX Minix MirOSBSD NetBSD OpenBSD OSF |
16
|
|
|
|
|
|
|
QNX SCO Solaris SunOS SysVr4 SysVr5 Unicos MidnightBSD |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
} |
19
|
9
|
|
|
9
|
0
|
31
|
sub os_is { Devel::CheckOS::os_is(matches()); } |
20
|
|
|
|
|
|
|
Devel::CheckOS::die_unsupported() unless(os_is()); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub expn { |
23
|
1
|
|
|
1
|
0
|
69
|
join("\n", |
24
|
|
|
|
|
|
|
"The OS supports multiple concurrent users, devices are represented as", |
25
|
|
|
|
|
|
|
"pseudo-files in /dev, there is a single root to the filesystem, users", |
26
|
|
|
|
|
|
|
"are protected from interference from other users, and the API is POSIXy.", |
27
|
|
|
|
|
|
|
"It should be reasonably easy to port a simple text-mode C program", |
28
|
|
|
|
|
|
|
"between Unixes.\n", |
29
|
|
|
|
|
|
|
"In some cases (eg Android, iOS) this might not be obvious or be exposed", |
30
|
|
|
|
|
|
|
"to users." |
31
|
|
|
|
|
|
|
) |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 COPYRIGHT and LICENCE |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Copyright 2007 - 2014 David Cantrell |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
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. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |