Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

config::mvp::assembler::withbundles(3pm) [debian 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)

Check Out this Related Man Page

Role::HasMessage::Errf(3pm)				User Contributed Perl Documentation			       Role::HasMessage::Errf(3pm)

NAME
Role::HasMessage::Errf - a thing with a String::Errf-powered message VERSION
version 0.005 SYNOPSIS
In your class... package Errfy; use Moose; with 'Role::HasMessage::Errf'; has payload => ( is => 'ro', isa => 'HashRef', required => 1, ); Then... my $thing = Errfy->new({ message => "%{error_count;error}n encountered at %{when}t", payload => { error_count => 2, when => time, }, }); # prints: 2 errors encountered at 2010-10-20 19:23:42 print $thing->message; DESCRIPTION
Role::HasMessage::Errf is an implementation of Role::HasMessage that uses String::Errf to format "sprintf"-like message strings. It adds a "message_fmt" attribute, initialized by the "message" argument. The value should be a String::Errf format string. When the provided "message" method is called, it will fill in the format string with the hashref returned by calling the "payload" method, which must be implemented by the including class. Role::HasMessage::Errf is a parameterized role. The "default" parameter lets you set a default format string or callback. The "lazy" parameter sets whether or not the "message_fmt" attribute is lazy. Setting it lazy will require that a default is provided. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 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.10.1 2010-10-28 Role::HasMessage::Errf(3pm)
Man Page