Class-TLB
view release on metacpan or search on metacpan
lib/Class/TLB.pm view on Meta::CPAN
'_tlb_prototype' => undef , # The prototype of a resource. Typically the first instance given.
'_tlb_usecount' => {} , # The usage count of each register object
'_tlb_rcount' => 0 ,
'_tlb_failpenalty' => $opts->{'failpenalty'} || 2 , # Delay a failed resource by 2 seconds
} ;
return bless $self , $class ;
}
=head2 isa
Overrides the UNIVERSAL::isa method to allow client code to transparently call isa method
on balanced resources.
Usage:
if ( $this->isa('Class::TLB::Dummy')){
...
}
=cut
sub isa{
lib/Class/TLB.pm view on Meta::CPAN
return UNIVERSAL::isa($o , @_ );
}
if ( $o->tlb_prototype() ){
return $o->tlb_prototype()->isa(@_);
}
return UNIVERSAL::isa($o , @_ );
}
=head2 can
Overrides the UNIVERSAL::can method to allow client code to transparently call can method
on balanced resources.
Usage:
if ( $this->can('doSomething')){
...
}
=cut
sub can{
( run in 0.509 second using v1.01-cache-2.11-cpan-0a6323c29d9 )