Debian Codegraph @

upstream/opensuse-tumbleweed/man3/Config::Perl::V.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 "Config::Perl::V 3pm"
61 .TH Config::Perl::V 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 Config::Perl::V \- Structured data retrieval of perl \-V output
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& use Config::Perl::V;
72 \&
73 \& my $local_config = Config::Perl::V::myconfig ();
74 \& print $local_config\->{config}{osname};
75 .Ve
76 .SH DESCRIPTION
77 .IX Header "DESCRIPTION"
78 .ie n .SS "$conf = myconfig ()"
79 .el .SS "\f(CW$conf\fP = myconfig ()"
80 .IX Subsection "$conf = myconfig ()"
81 This function will collect the data described in "The hash structure" below,
82 and return that as a hash reference. It optionally accepts an option to
83 include more entries from \f(CW%ENV\fR. See "environment" below.
84 .PP
85 Note that this will not work on uninstalled perls when called with
86 \&\f(CW\*(C`\-I/path/to/uninstalled/perl/lib\*(C'\fR, but it works when that path is in
87 \&\f(CW$PERL5LIB\fR or in \f(CW$PERL5OPT\fR, as paths passed using \f(CW\*(C`\-I\*(C'\fR are not
88 known when the \f(CW\*(C`\-V\*(C'\fR information is collected.
89 .ie n .SS "$conf = plv2hash ($text [, ...])"
90 .el .SS "\f(CW$conf\fP = plv2hash ($text [, ...])"
91 .IX Subsection "$conf = plv2hash ($text [, ...])"
92 Convert a sole \*(Aqperl \-V\*(Aq text block, or list of lines, to a complete
93 myconfig hash. All unknown entries are defaulted.
94 .ie n .SS "$info = summary ([$conf])"
95 .el .SS "\f(CW$info\fP = summary ([$conf])"
96 .IX Subsection "$info = summary ([$conf])"
97 Return an arbitrary selection of the information. If no \f(CW$conf\fR is
98 given, \f(CW\*(C`myconfig ()\*(C'\fR is used instead.
99 .ie n .SS "$md5 = signature ([$conf])"
100 .el .SS "\f(CW$md5\fP = signature ([$conf])"
101 .IX Subsection "$md5 = signature ([$conf])"
102 Return the MD5 of the info returned by \f(CW\*(C`summary ()\*(C'\fR without the
103 \&\f(CW\*(C`config_args\*(C'\fR entry.
104 .PP
105 If \f(CW\*(C`Digest::MD5\*(C'\fR is not available, it return a string with only \f(CW0\fR\*(Aqs.
106 .SS "The hash structure"
107 .IX Subsection "The hash structure"
108 The returned hash consists of 4 parts:
109 .IP build 4
110 .IX Item "build"
111 This information is extracted from the second block that is emitted by
112 \&\f(CW\*(C`perl \-V\*(C'\fR, and usually looks something like
113 .Sp
114 .Vb 10
115 \& Characteristics of this binary (from libperl):
116 \& Compile\-time options: DEBUGGING USE_64_BIT_INT USE_LARGE_FILES
117 \& Locally applied patches:
118 \& defined\-or
119 \& MAINT24637
120 \& Built under linux
121 \& Compiled at Jun 13 2005 10:44:20
122 \& @INC:
123 \& /usr/lib/perl5/5.8.7/i686\-linux\-64int
124 \& /usr/lib/perl5/5.8.7
125 \& /usr/lib/perl5/site_perl/5.8.7/i686\-linux\-64int
126 \& /usr/lib/perl5/site_perl/5.8.7
127 \& /usr/lib/perl5/site_perl
128 \& .
129 .Ve
130 .Sp
131 or
132 .Sp
133 .Vb 9
134 \& Characteristics of this binary (from libperl):
135 \& Compile\-time options: DEBUGGING MULTIPLICITY
136 \& PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
137 \& PERL_MALLOC_WRAP PERL_TRACK_MEMPOOL
138 \& PERL_USE_SAFE_PUTENV USE_ITHREADS
139 \& USE_LARGE_FILES USE_PERLIO
140 \& USE_REENTRANT_API
141 \& Built under linux
142 \& Compiled at Jan 28 2009 15:26:59
143 .Ve
144 .Sp
145 This information is not available anywhere else, including \f(CW%Config\fR,
146 but it is the information that is only known to the perl binary.
147 .Sp
148 The extracted information is stored in 5 entries in the \f(CW\*(C`build\*(C'\fR hash:
149 .RS 4
150 .IP osname 4
151 .IX Item "osname"
152 This is most likely the same as \f(CW$Config{osname}\fR, and was the name
153 known when perl was built. It might be different if perl was cross\-compiled.
154 .Sp
155 The default for this field, if it cannot be extracted, is to copy
156 \&\f(CW$Config{osname}\fR. The two may be differing in casing (OpenBSD vs openbsd).
157 .IP stamp 4
158 .IX Item "stamp"
159 This is the time string for which the perl binary was compiled. The default
160 value is 0.
161 .IP options 4
162 .IX Item "options"
163 This is a hash with all the known defines as keys. The value is either 0,
164 which means unknown or unset, or 1, which means defined.
165 .IP derived 4
166 .IX Item "derived"
167 As some variables are reported by a different name in the output of \f(CW\*(C`perl \-V\*(C'\fR
168 than their actual name in \f(CW%Config\fR, I decided to leave the \f(CW\*(C`config\*(C'\fR entry
169 as close to reality as possible, and put in the entries that might have been
170 guessed by the printed output in a separate block.
171 .IP patches 4
172 .IX Item "patches"
173 This is a list of optionally locally applied patches. Default is an empty list.
174 .RE
175 .RS 4
176 .RE
177 .IP environment 4
178 .IX Item "environment"
179 By default this hash is only filled with the environment variables
180 out of \f(CW%ENV\fR that start with \f(CW\*(C`PERL\*(C'\fR, but you can pass the \f(CW\*(C`env\*(C'\fR option
181 to myconfig to get more
182 .Sp
183 .Vb 2
184 \& my $conf = Config::Perl::V::myconfig ({ env => qr/^ORACLE/ });
185 \& my $conf = Config::Perl::V::myconfig ([ env => qr/^ORACLE/ ]);
186 .Ve
187 .IP config 4
188 .IX Item "config"
189 This hash is filled with the variables that \f(CW\*(C`perl \-V\*(C'\fR fills its report
190 with, and it has the same variables that \f(CW\*(C`Config::myconfig\*(C'\fR returns
191 from \f(CW%Config\fR.
192 .IP inc 4
193 .IX Item "inc"
194 This is the list of default \f(CW@INC\fR.
195 .SH REASONING
196 .IX Header "REASONING"
197 This module was written to be able to return the configuration for the
198 currently used perl as deeply as needed for the CPANTESTERS framework.
199 Up until now they used the output of myconfig as a single text blob,
200 and so it was missing the vital binary characteristics of the running
201 perl and the optional applied patches.
202 .SH BUGS
203 .IX Header "BUGS"
204 Please feedback what is wrong
205 .SH TODO
206 .IX Header "TODO"
207 .Vb 4
208 \& * Implement retrieval functions/methods
209 \& * Documentation
210 \& * Error checking
211 \& * Tests
212 .Ve
213 .SH AUTHOR
214 .IX Header "AUTHOR"
215 H.Merijn Brand <[email protected]>
216 .SH "COPYRIGHT AND LICENSE"
217 .IX Header "COPYRIGHT AND LICENSE"
218 Copyright (C) 2009\-2025 H.Merijn Brand
219 .PP
220 This library is free software; you can redistribute it and/or modify
221 it under the same terms as Perl itself.