Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

config::mvp::sequence(3pm) [debian man page]

Config::MVP::Sequence(3pm)				User Contributed Perl Documentation				Config::MVP::Sequence(3pm)

NAME
Config::MVP::Sequence - an ordered set of named configuration sections VERSION
version 2.200002 DESCRIPTION
A Config::MVP::Sequence is an ordered set of configuration sections, each of which has a name unique within the sequence. For the most part, you can just consult Config::MVP to understand what this class is and how it's used. ATTRIBUTES
is_finalized This attribute is true if the sequence has been marked finalized, which will prevent any changes (via methods like "add_section" or "delete_section"). It can be set with the "finalize" method. METHODS
add_section $sequence->add_section($section); This method adds the given section to the end of the sequence. If the sequence already contains a section with the same name as the new section, an exception will be raised. delete_section my $deleted_section = $sequence->delete_section( $name ); This method removes a section from the sequence and returns the removed section. If no section existed, the method returns false. section_named my $section = $sequence->section_named( $name ); This method returns the section with the given name, if one exists in the sequence. If no such section exists, the method returns false. section_names my @names = $sequence->section_names; This method returns a list of the names of the sections, in order. sections my @sections = $sequence->sections; This method returns the section objects, in order. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-03-16 Config::MVP::Sequence(3pm)

Check Out this Related Man Page

Config::MVP::Assembler::WithBundles(3pm)		User Contributed Perl Documentation		  Config::MVP::Assembler::WithBundles(3pm)

NAME
Config::MVP::Assembler::WithBundles - a role to make assemblers expand bundles VERSION
version 2.200002 DESCRIPTION
Config::MVP::Assembler::WithBundles is a role to be composed into a Config::MVP::Assembler subclass. It allows some sections of configuration to be treated as bundles. When any section is ended, if that section represented a bundle, its bundle contents will be unrolled and will replace it in the sequence. A package is considered a bundle if the this returns a defined method: my $method = $assembler->package_bundle_method($package); The default implementation looks for a method callde "mvp_bundle_config", but "package_bundle_method" can be replaced to allow for other bundle-identifying information. Bundles are expanded by a call to the assembler's "replace_bundle_with_contents" method, like this: $assembler->replace_bundle_with_contents($section, $method); replace_bundle_with_contents The default "replace_bundle_with_contents" method deletes the section from the sequence. It then gets a description of the new sections to introduce, like this: my @new_config = $bundle_section->package->$method({ name => $bundle_section->name, package => $bundle_section->package, payload => $bundle_section->payload, }); (We pass a hashref rather than a section so that bundles can be expanded synthetically without having to laboriously create a new Section.) The returned @new_config is a list of arrayrefs, each of which has three entries: [ $name, $package, $payload ] Each arrayref is converted into a section in the sequence. The $payload should be an arrayref of name/value pairs to be added to the created section. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-03-16 Config::MVP::Assembler::WithBundles(3pm)
Man Page