Sophie

Sophie

distrib > Mageia > 6 > i586 > by-pkgid > 904282f21fd8b2e8264a495f7d8e151e

perl-Class-Factory-1.60.0-2.mga6.noarch.rpm

Description:

This is a simple module that factory classes can use to generate new types
of objects on the fly, providing a consistent interface to common groups of
objects.

Factory classes are used when you have different implementations for the
same set of tasks but may not know in advance what implementations you will
be using. Configuration files are a good example of this. There are four
basic operations you would want to do with any configuration: read the file
in, lookup a value, set a value, write the file out. There are also many
different types of configuration files, and you may want users to be able
to provide an implementation for their own home-grown configuration format.

With a factory class this is easy. To create the factory class, just
subclass 'Class::Factory' and create an interface for your configuration
serializer. 'Class::Factory' even provides a simple constructor for you.
Here's a sample interface and our two built-in configuration types:

Sources packages:

Other version of this rpm: