The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DesignPattern::Factory::Creator - a participant in the Perl implementation of the Factory Method.

DESCRIPTION

DesignPattern::Factory::Creator is the superclass of DesignPattern::Factory::ConcreteCreator. That is, ConcreteCreator inherits all methods from Creator, but can override these methods by implementing its own methods.

From GOF, the DesignPattern::Factory::Creator class:

- declares the factory method, which returns an object of type DesignPattern::Factory::Product. DesignPattern::Factory::Creator may also define a default implementation of the factory method that returns a default DesignPattern::Factory::ConcreteProduct object.

- may call the factory method to create a Product object.

new()

Constructor for this class. Usage:

  my $object = DesignPattern::Factory::Pattern->new();

FactoryMethod()

The default FactoryMethod just dies with an error, thus ensuring that all subclasses implement a working version of this method.

AnOperation()

Calls FactoryMethod() and stores the result.

AUTHOR

Nigel Wetters (nwetters@cpan.org)

COPYRIGHT

Copyright (c) 2001, Nigel Wetters. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.