.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Dpkg::BuildOptions 3" .TH Dpkg::BuildOptions 3 "2018-06-26" "1.18.25" "libdpkg-perl" .\" 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" Dpkg::BuildOptions \- parse and update build options .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Dpkg::BuildOptions object can be used to manipulate options stored in environment variables like \s-1DEB_BUILD_OPTIONS\s0 and \&\s-1DEB_BUILD_MAINT_OPTIONS.\s0 .SH "METHODS" .IX Header "METHODS" .ie n .IP "$bo = Dpkg::BuildOptions\->new(%opts)" 4 .el .IP "\f(CW$bo\fR = Dpkg::BuildOptions\->new(%opts)" 4 .IX Item "$bo = Dpkg::BuildOptions->new(%opts)" Create a new Dpkg::BuildOptions object. It will be initialized based on the value of the environment variable named \f(CW$opts\fR{envvar} (or \&\s-1DEB_BUILD_OPTIONS\s0 if that option is not set). .ie n .IP "$bo\->\fIreset()\fR" 4 .el .IP "\f(CW$bo\fR\->\fIreset()\fR" 4 .IX Item "$bo->reset()" Reset the object to not have any option (it's empty). .ie n .IP "$bo\->merge($content, $source)" 4 .el .IP "\f(CW$bo\fR\->merge($content, \f(CW$source\fR)" 4 .IX Item "$bo->merge($content, $source)" Merge the options set in \f(CW$content\fR and record that they come from the source \f(CW$source\fR. \f(CW$source\fR is mainly used in warning messages currently to indicate where invalid options have been detected. .Sp \&\f(CW$content\fR is a space separated list of options with optional assigned values like \*(L"nocheck parallel=2\*(R". .ie n .IP "$bo\->set($option, $value, [$source])" 4 .el .IP "\f(CW$bo\fR\->set($option, \f(CW$value\fR, [$source])" 4 .IX Item "$bo->set($option, $value, [$source])" Store the given option in the object with the given value. It's legitimate for a value to be undefined if the option is a simple boolean (its presence means true, its absence means false). The \f(CW$source\fR is optional and indicates where the option comes from. .Sp The known options have their values checked for sanity. Options without values have their value removed and options with invalid values are discarded. .ie n .IP "$bo\->get($option)" 4 .el .IP "\f(CW$bo\fR\->get($option)" 4 .IX Item "$bo->get($option)" Return the value associated to the option. It might be undef even if the option exists. You might want to check with \f(CW$bo\fR\->has($option) to verify if the option is stored in the object. .ie n .IP "$bo\->has($option)" 4 .el .IP "\f(CW$bo\fR\->has($option)" 4 .IX Item "$bo->has($option)" Returns a boolean indicating whether the option is stored in the object. .ie n .IP "$bo\->parse_features($option, $use_feature)" 4 .el .IP "\f(CW$bo\fR\->parse_features($option, \f(CW$use_feature\fR)" 4 .IX Item "$bo->parse_features($option, $use_feature)" Parse the \f(CW$option\fR values, as a set of known features to enable or disable, as specified in the \f(CW$use_feature\fR hash reference. .Sp Each feature is prefixed with a ‘\fB+\fR’ or a ‘\fB\-\fR’ character as a marker to enable or disable it. The special feature “\fBall\fR” can be used to act on all known features. .Sp Unknown of malformed features will emit warnings. .ie n .IP "$string = $bo\->output($fh)" 4 .el .IP "\f(CW$string\fR = \f(CW$bo\fR\->output($fh)" 4 .IX Item "$string = $bo->output($fh)" Return a string representation of the build options suitable to be assigned to an environment variable. Can optionally output that string to the given filehandle. .ie n .IP "$bo\->export([$var])" 4 .el .IP "\f(CW$bo\fR\->export([$var])" 4 .IX Item "$bo->export([$var])" Export the build options to the given environment variable. If omitted, the environment variable defined at creation time is assumed. The value set to the variable is also returned. .SH "CHANGES" .IX Header "CHANGES" .SS "Version 1.02 (dpkg 1.18.19)" .IX Subsection "Version 1.02 (dpkg 1.18.19)" New method: \f(CW$bo\fR\->\fIparse_features()\fR. .SS "Version 1.01 (dpkg 1.16.1)" .IX Subsection "Version 1.01 (dpkg 1.16.1)" Enable to use another environment variable instead of \s-1DEB_BUILD_OPTIONS.\s0 Thus add support for the \*(L"envvar\*(R" option at creation time. .SS "Version 1.00 (dpkg 1.15.6)" .IX Subsection "Version 1.00 (dpkg 1.15.6)" Mark the module as public.