UMMF::Core::Factory - Defines a factory for model construction.
use UMMF::Core::Factory; $factory = UMMF::Core::Factory->new('classMap' => ..., ); $factory->create('SomeClassName', ...); $factory->createInstance('SomeClassName', ...);
None exported.
Kurt Stephens, kstephens@users.sourceforge.net 2003/04/06
UMMF::Core::MetaModel
$Revision: 1.14 $
my $map = $self->classMap;
Returns a hash that maps names to Perl package names.
If $self->{'classMap'} is a SCALAR, $self->{'classMap'} = $self->{'classMap'}->factory_map is performed, loading the class map from a package's factory_map method..
If $self->{'classMap'} is an ARRAY, the ARRAY is transformed into a hash. In this case, colliding $names will have concatenated package names that should cause $self->class($name) to fail.
my $pkg = $self->class($name, @args);
Returns the Perl package for the Classifier named $name.
$name
The Perl package is dynamically loaded, if necessary.
Called by create and create_instance.
create
create_instance
my $obj = $self->create_instance($name, @args);
Creates a new instance of the class named $name, via $pkg->__new_instance(@args).
This creates a new uninitialized object.
my $obj = $self->create($name, @args);
Creates a new initialized instance of the class named $name, via $pkg->new(@args).
$self->flush($kind);
Called by UMMF::Core::Builder for each $kind of object created during Model construction.
UMMF::Core::Builder
Subclasses may override this method.
To install UMMF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UMMF
CPAN shell
perl -MCPAN -e shell install UMMF
For more information on module installation, please visit the detailed CPAN module installation guide.