Class::Component::Recipe - Dynamic Component Containers
use Class::Component::Recipe; # Create a new C:C:R object. Most work is done in the collection my $ccr = Class::Component::Recipe->new(base_class => 'Foo::Base'); my $col = $ccr->get_collection; # Prepare the class list as you need it. See the Collection pod. $col->push('Foo::ComponentA'); $col->push('Foo::ComponentB'); $col->insert('Foo::Middle', 1); # Install. @MyApp::Foo::ISA is now: Foo::ComponentB, Foo::Middle, # Foo::ComponentA, Foo::Base. Previously existing entries will be # before Foo::Base. $ccr->install('MyApp::Foo');
This module provides functionality to build a collection of classes and install it together with a base in a container class. This allows the dynamic creation of component based classes.
The base class of the component container to build.
The collection object handling component order and installing the final container.
The class name of the collection object this recipe will produce.
Moose method. Initializes collection if not passed to constructor.
collection
Installs the collection and the base class into the $target_class.
$target_class
Class::Component::Recipe::Collection for the collection interface. NEXT, C3 for component designing systems with multiple inheritance.
aliased, Class::Inspector, Carp::Clan, Moose, Moose::Policy, Test::More (for build).
Robert 'phaylon' Sedlacek <phaylon@dunkelheit.at>
<phaylon@dunkelheit.at>
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Class::Component::Recipe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Component::Recipe
CPAN shell
perl -MCPAN -e shell install Class::Component::Recipe
For more information on module installation, please visit the detailed CPAN module installation guide.