The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

ResourcePool::Factory - A factory to create ResourcePool::Resource objects

SYNOPSIS

 use ResourcePool::Factory;

 my $factory = ResourcePool::Factory->new();

DESCRIPTION

This package is not indented to be used directly. In fact it is a base class to derive your own classes to use with the ResourcePool.

This factories are used in conjunction with the ResourcePool class.

The purpose of such factories is to store the relevant data to create a resource in their private storage. Afterwards a resource can be created without any further parameters.

ResourcePool::Factory->new

The new method is called to create a new factory.

Usually this method just stores the parameters somewhere, blesses itself and returnes the blessed reference.

You must overload this method in order to do something useful.

$pool->create_resource

This method is used to actually create a resource according to the parameters given to the new() method.

You must overload this method in order to do something useful.

$pool->info()

This method is sometimes used to report details about a failed resource.

You must not overload this method, but its highly recommeded for reporting purposes.

SEE ALSO

ResourcePool(3pm), ResourcePool::Resource(3pm), ResourcePool::Factory::DBI(3pm), ResourcePool::Factory::Net::LDAP(3pm)

AUTHOR

    Copyright (C) 2002 by Markus Winand <mws@fatalmind.com>

    This program is free software; you can redistribute it and/or
    modify it under the same terms as Perl itself.