.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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 .. .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::MVP::Section 3pm" .TH Config::MVP::Section 3pm "2021-01-10" "perl v5.32.0" "User Contributed Perl Documentation" .\" 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::MVP::Section \- one section of an MVP configuration sequence .SH "VERSION" .IX Header "VERSION" version 2.200012 .SH "DESCRIPTION" .IX Header "DESCRIPTION" For the most part, you can just consult Config::MVP to understand what this class is and how it's used. .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .SS "name" .IX Subsection "name" This is the section's name. It's a string, and it must be provided. .SS "package" .IX Subsection "package" This is the (Perl) package with which the section is associated. It is optional. When the section is instantiated, it will ensure that this package is loaded. .SS "multivalue_args" .IX Subsection "multivalue_args" This attribute is an arrayref of value names that should be considered multivalue properties in the section. When added to the section, they will always be wrapped in an arrayref, and they may be added to the section more than once. .PP If this attribute is not given during construction, it will default to the result of calling section's package's \f(CW\*(C`mvp_multivalue_args\*(C'\fR method. If the section has no associated package or if the package doesn't provide that method, it default to an empty arrayref. .SS "aliases" .IX Subsection "aliases" This attribute is a hashref of name remappings. For example, if it contains this hashref: .PP .Vb 4 \& { \& file => \*(Aqfiles\*(Aq, \& path => \*(Aqfiles\*(Aq, \& } .Ve .PP Then attempting to set either the \*(L"file\*(R" or \*(L"path\*(R" setting for the section would actually set the \*(L"files\*(R" setting. .PP If this attribute is not given during construction, it will default to the result of calling section's package's \f(CW\*(C`mvp_aliases\*(C'\fR method. If the section has no associated package or if the package doesn't provide that method, it default to an empty hashref. .SS "payload" .IX Subsection "payload" This is the storage into which properties are set. It is a hashref of names and values. You should probably not alter the contents of the payload, and should read its contents only. .SS "is_finalized" .IX Subsection "is_finalized" This attribute is true if the section has been marked finalized, which will prevent any new values from being added to it. It can be set with the \&\f(CW\*(C`finalize\*(C'\fR method. .SS "sequence" .IX Subsection "sequence" This attributes points to the sequence into which the section has been assembled. It may be unset if the section has been created but not yet placed in a sequence. .SH "METHODS" .IX Header "METHODS" .SS "add_value" .IX Subsection "add_value" .Vb 1 \& $section\->add_value( $name => $value ); .Ve .PP This method sets the value for the named property to the given value. If the property is a multivalue property, the new value will be pushed onto the end of an arrayref that will store all values for that property. .PP Attempting to add a value for a non-multivalue property whose value was already added will result in an exception. .SS "load_package" .IX Subsection "load_package" .Vb 1 \& $section\->load_package($package, $section_name); .Ve .PP This method is used to ensure that the given \f(CW$package\fR is loaded, and is called whenever a section with a package is created. By default, it delegates to Class::Load. If the package can't be found, it calls the missing_package method. Errors in compilation are not suppressed. .SS "missing_package" .IX Subsection "missing_package" .Vb 1 \& $section\->missing_package($package, $section_name); .Ve .PP This method is called when \f(CW\*(C`load_package\*(C'\fR encounters a package that is not installed. By default, it throws an exception. .SH "AUTHOR" .IX Header "AUTHOR" Ricardo Signes .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2021 by Ricardo Signes. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.