Class::Factory::Enhanced - more functionality for Class::Factory
package My::Factory; use base 'Class::Factory::Enhanced'; package Some::Class; My::Factory->add_factory_type( person_name => 'Person::Name', person_address => 'Person::Address' );
This class subclasses Class::Factory and adds some functionality.
This class overrides and adds the following methods.
Like Class::Factory's add_factory_type(), but this one can add several mappings at once. See the Synopsis for an example.
Class::Factory
add_factory_type()
Like Class::Factory's register_factory_type(), but this one can add several mappings at once.
register_factory_type()
$factory->make_object_for_type('person_name', last_name => 'Shindou', first_name => 'Hikaru', );
An alternative constructor that gets the class to be constructed from the factory, then calls new() on that class.
new()
Takes as arguments the object type to be constructed and a list of arguments to be passed to the constructor (new()) of the newly constructed object.
If you talk about this module in blogs, on del.icio.us or anywhere else, please use the classfactoryenhanced tag.
classfactoryenhanced
No bugs have been reported.
Please report any bugs or feature requests to bug-class-factory-enhanced@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-class-factory-enhanced@rt.cpan.org
See perlmodinstall for information and options on installing Perl modules.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>.
Marcel Grünauer, <marcel@cpan.org>
<marcel@cpan.org>
Copyright 2007 by Marcel Grünauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Class::Factory::Enhanced, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Factory::Enhanced
CPAN shell
perl -MCPAN -e shell install Class::Factory::Enhanced
For more information on module installation, please visit the detailed CPAN module installation guide.