Take me over?
The maintainer of this distribution is looking for someone to take over!
If you're interested then please contact them via
email.
NAME
POE::Component::ResourcePool::Resource::TryList - Delegate to a number of resources.
SYNOPSIS
use POE::Component::ResourcePool::Resource::TryList;
my $good = POE::Component::ResourcePool::Resource::Good->new( ... );
my $better = POE::Component::ResourcePool::Resource::Better->new( ... );
my $best = POE::Component::ResourcePool::Resource::TryList->new(
resources => [ $better, $good ],
);
DESCRIPTION
This class allows you to specify fallback lists for resources easily.
The resources will be delegated to appropriately.
The only difference is that sometimes resources that return false from could_allocate
will still have try_allocating
called on them, because the try list only requires that one of the sub resources return true from could_allocate
.
It is trivial to subclass and override it such that could_allocate
only returns true if all the sub resources do, thus resolving this issue. However, this seems to have a diminished practical value to me.
ATTRIBUTES
- resources
-
The array of resources to deleate to.