diff options
Diffstat (limited to 'upstream/mageia-cauldron/man3pm/Config::Perl::V.3pm')
-rw-r--r-- | upstream/mageia-cauldron/man3pm/Config::Perl::V.3pm | 218 |
1 files changed, 218 insertions, 0 deletions
diff --git a/upstream/mageia-cauldron/man3pm/Config::Perl::V.3pm b/upstream/mageia-cauldron/man3pm/Config::Perl::V.3pm new file mode 100644 index 00000000..e7bd9614 --- /dev/null +++ b/upstream/mageia-cauldron/man3pm/Config::Perl::V.3pm @@ -0,0 +1,218 @@ +.\" -*- mode: troff; coding: utf-8 -*- +.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. +.ie n \{\ +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" ======================================================================== +.\" +.IX Title "Config::Perl::V 3pm" +.TH Config::Perl::V 3pm 2023-11-28 "perl v5.38.2" "Perl Programmers Reference Guide" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH NAME +Config::Perl::V \- Structured data retrieval of perl \-V output +.SH SYNOPSIS +.IX Header "SYNOPSIS" +.Vb 1 +\& use Config::Perl::V; +\& +\& my $local_config = Config::Perl::V::myconfig (); +\& print $local_config\->{config}{osname}; +.Ve +.SH DESCRIPTION +.IX Header "DESCRIPTION" +.ie n .SS "$conf = myconfig ()" +.el .SS "\f(CW$conf\fP = myconfig ()" +.IX Subsection "$conf = myconfig ()" +This function will collect the data described in "The hash structure" below, +and return that as a hash reference. It optionally accepts an option to +include more entries from \f(CW%ENV\fR. See "environment" below. +.PP +Note that this will not work on uninstalled perls when called with +\&\f(CW\*(C`\-I/path/to/uninstalled/perl/lib\*(C'\fR, but it works when that path is in +\&\f(CW$PERL5LIB\fR or in \f(CW$PERL5OPT\fR, as paths passed using \f(CW\*(C`\-I\*(C'\fR are not +known when the \f(CW\*(C`\-V\*(C'\fR information is collected. +.ie n .SS "$conf = plv2hash ($text [, ...])" +.el .SS "\f(CW$conf\fP = plv2hash ($text [, ...])" +.IX Subsection "$conf = plv2hash ($text [, ...])" +Convert a sole 'perl \-V' text block, or list of lines, to a complete +myconfig hash. All unknown entries are defaulted. +.ie n .SS "$info = summary ([$conf])" +.el .SS "\f(CW$info\fP = summary ([$conf])" +.IX Subsection "$info = summary ([$conf])" +Return an arbitrary selection of the information. If no \f(CW$conf\fR is +given, \f(CW\*(C`myconfig ()\*(C'\fR is used instead. +.ie n .SS "$md5 = signature ([$conf])" +.el .SS "\f(CW$md5\fP = signature ([$conf])" +.IX Subsection "$md5 = signature ([$conf])" +Return the MD5 of the info returned by \f(CW\*(C`summary ()\*(C'\fR without the +\&\f(CW\*(C`config_args\*(C'\fR entry. +.PP +If \f(CW\*(C`Digest::MD5\*(C'\fR is not available, it return a string with only \f(CW0\fR's. +.SS "The hash structure" +.IX Subsection "The hash structure" +The returned hash consists of 4 parts: +.IP build 4 +.IX Item "build" +This information is extracted from the second block that is emitted by +\&\f(CW\*(C`perl \-V\*(C'\fR, and usually looks something like +.Sp +.Vb 10 +\& Characteristics of this binary (from libperl): +\& Compile\-time options: DEBUGGING USE_64_BIT_INT USE_LARGE_FILES +\& Locally applied patches: +\& defined\-or +\& MAINT24637 +\& Built under linux +\& Compiled at Jun 13 2005 10:44:20 +\& @INC: +\& /usr/lib/perl5/5.8.7/i686\-linux\-64int +\& /usr/lib/perl5/5.8.7 +\& /usr/lib/perl5/site_perl/5.8.7/i686\-linux\-64int +\& /usr/lib/perl5/site_perl/5.8.7 +\& /usr/lib/perl5/site_perl +\& . +.Ve +.Sp +or +.Sp +.Vb 9 +\& Characteristics of this binary (from libperl): +\& Compile\-time options: DEBUGGING MULTIPLICITY +\& PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT +\& PERL_MALLOC_WRAP PERL_TRACK_MEMPOOL +\& PERL_USE_SAFE_PUTENV USE_ITHREADS +\& USE_LARGE_FILES USE_PERLIO +\& USE_REENTRANT_API +\& Built under linux +\& Compiled at Jan 28 2009 15:26:59 +.Ve +.Sp +This information is not available anywhere else, including \f(CW%Config\fR, +but it is the information that is only known to the perl binary. +.Sp +The extracted information is stored in 5 entries in the \f(CW\*(C`build\*(C'\fR hash: +.RS 4 +.IP osname 4 +.IX Item "osname" +This is most likely the same as \f(CW$Config{osname}\fR, and was the name +known when perl was built. It might be different if perl was cross-compiled. +.Sp +The default for this field, if it cannot be extracted, is to copy +\&\f(CW$Config{osname}\fR. The two may be differing in casing (OpenBSD vs openbsd). +.IP stamp 4 +.IX Item "stamp" +This is the time string for which the perl binary was compiled. The default +value is 0. +.IP options 4 +.IX Item "options" +This is a hash with all the known defines as keys. The value is either 0, +which means unknown or unset, or 1, which means defined. +.IP derived 4 +.IX Item "derived" +As some variables are reported by a different name in the output of \f(CW\*(C`perl \-V\*(C'\fR +than their actual name in \f(CW%Config\fR, I decided to leave the \f(CW\*(C`config\*(C'\fR entry +as close to reality as possible, and put in the entries that might have been +guessed by the printed output in a separate block. +.IP patches 4 +.IX Item "patches" +This is a list of optionally locally applied patches. Default is an empty list. +.RE +.RS 4 +.RE +.IP environment 4 +.IX Item "environment" +By default this hash is only filled with the environment variables +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 +to myconfig to get more +.Sp +.Vb 2 +\& my $conf = Config::Perl::V::myconfig ({ env => qr/^ORACLE/ }); +\& my $conf = Config::Perl::V::myconfig ([ env => qr/^ORACLE/ ]); +.Ve +.IP config 4 +.IX Item "config" +This hash is filled with the variables that \f(CW\*(C`perl \-V\*(C'\fR fills its report +with, and it has the same variables that \f(CW\*(C`Config::myconfig\*(C'\fR returns +from \f(CW%Config\fR. +.IP inc 4 +.IX Item "inc" +This is the list of default \f(CW@INC\fR. +.SH REASONING +.IX Header "REASONING" +This module was written to be able to return the configuration for the +currently used perl as deeply as needed for the CPANTESTERS framework. +Up until now they used the output of myconfig as a single text blob, +and so it was missing the vital binary characteristics of the running +perl and the optional applied patches. +.SH BUGS +.IX Header "BUGS" +Please feedback what is wrong +.SH TODO +.IX Header "TODO" +.Vb 4 +\& * Implement retrieval functions/methods +\& * Documentation +\& * Error checking +\& * Tests +.Ve +.SH AUTHOR +.IX Header "AUTHOR" +H.Merijn Brand <h.m.brand@xs4all.nl> +.SH "COPYRIGHT AND LICENSE" +.IX Header "COPYRIGHT AND LICENSE" +Copyright (C) 2009\-2023 H.Merijn Brand +.PP +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. |