Debian Codegraph @

upstream/opensuse-tumbleweed/man3/Perl::OSType.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "Perl::OSType 3pm"
61 .TH Perl::OSType 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 Perl::OSType \- Map Perl operating system names to generic types
68 .SH VERSION
69 .IX Header "VERSION"
70 version 1.010
71 .SH SYNOPSIS
72 .IX Header "SYNOPSIS"
73 .Vb 1
74 \& use Perl::OSType \*(Aq:all\*(Aq;
75 \&
76 \& $current_type = os_type();
77 \& $other_type = os_type(\*(Aqdragonfly\*(Aq); # gives \*(AqUnix\*(Aq
78 .Ve
79 .SH DESCRIPTION
80 .IX Header "DESCRIPTION"
81 Modules that provide OS\-specific behaviors often need to know if
82 the current operating system matches a more generic type of
83 operating systems. For example, \*(Aqlinux\*(Aq is a type of \*(AqUnix\*(Aq operating system
84 and so is \*(Aqfreebsd\*(Aq.
85 .PP
86 This module provides a mapping between an operating system name as given by
87 \&\f(CW$^O\fR and a more generic type. The initial version is based on the OS type
88 mappings provided in Module::Build and ExtUtils::CBuilder. (Thus,
89 Microsoft operating systems are given the type \*(AqWindows\*(Aq rather than \*(AqWin32\*(Aq.)
90 .SH USAGE
91 .IX Header "USAGE"
92 No functions are exported by default. The export tag ":all" will export
93 all functions listed below.
94 .SS \fBos_type()\fP
95 .IX Subsection "os_type()"
96 .Vb 2
97 \& $os_type = os_type();
98 \& $os_type = os_type(\*(AqMSWin32\*(Aq);
99 .Ve
100 .PP
101 Returns a single, generic OS type for a given operating system name. With no
102 arguments, returns the OS type for the current value of \f(CW$^O\fR. If the
103 operating system is not recognized, the function will return the empty string.
104 .SS \fBis_os_type()\fP
105 .IX Subsection "is_os_type()"
106 .Vb 2
107 \& $is_windows = is_os_type(\*(AqWindows\*(Aq);
108 \& $is_unix = is_os_type(\*(AqUnix\*(Aq, \*(Aqdragonfly\*(Aq);
109 .Ve
110 .PP
111 Given an OS type and OS name, returns true or false if the OS name is of the
112 given type. As with \f(CW\*(C`os_type\*(C'\fR, it will use the current operating system as a
113 default if no OS name is provided.
114 .SH "SEE ALSO"
115 .IX Header "SEE ALSO"
116 .IP \(bu 4
117 Devel::CheckOS
118 .SH SUPPORT
119 .IX Header "SUPPORT"
120 .SS "Bugs / Feature Requests"
121 .IX Subsection "Bugs / Feature Requests"
122 Please report any bugs or feature requests through the issue tracker
123 at <https://github.com/Perl\-Toolchain\-Gang/Perl\-OSType/issues>.
124 You will be notified automatically of any progress on your issue.
125 .SS "Source Code"
126 .IX Subsection "Source Code"
127 This is open source software. The code repository is available for
128 public review and contribution under the terms of the license.
129 .PP
130 <https://github.com/Perl\-Toolchain\-Gang/Perl\-OSType>
131 .PP
132 .Vb 1
133 \& git clone https://github.com/Perl\-Toolchain\-Gang/Perl\-OSType.git
134 .Ve
135 .SH AUTHOR
136 .IX Header "AUTHOR"
137 David Golden <[email protected]>
138 .SH CONTRIBUTORS
139 .IX Header "CONTRIBUTORS"
140 .IP \(bu 4
141 Chris \*(AqBinGOs\*(Aq Williams <[email protected]>
142 .IP \(bu 4
143 David Golden <[email protected]>
144 .IP \(bu 4
145 Graham Ollis <[email protected]>
146 .IP \(bu 4
147 Jonas B. Nielsen <[email protected]>
148 .IP \(bu 4
149 Owain G. Ainsworth <[email protected]>
150 .IP \(bu 4
151 Paul Green <[email protected]>
152 .IP \(bu 4
153 Piotr Roszatycki <[email protected]>
154 .SH "COPYRIGHT AND LICENSE"
155 .IX Header "COPYRIGHT AND LICENSE"
156 This software is copyright (c) 2016 by David Golden.
157 .PP
158 This is free software; you can redistribute it and/or modify it under
159 the same terms as the Perl 5 programming language system itself.