[Redis] Redis client: Timeouts !

Steffen Mueller smueller at cpan.org
Fri Dec 27 16:02:44 GMT 2013

On 12/27/2013 10:23 AM, Damien Krotkine wrote:
> Basically I was left with:
> - pollute the Socket class ( monkey-patching ) - or pollute each of
> the children classes ( more monkey-patching and not future proof ) -
> provide an ugly API like IO::Socket::Timeout->create_with_timeout(
> class => 'IO::Socket::Unix', ...) - use the same approach than
> Import::Into
> I think it's leont who suggested the import::into way. Yes, it
> pollutes the 'new::with' namespace ( but I doubt this will be an
> issue, ever) as Import::into pollutes its namespace. Yes, some people
> may think that the code added a new method in IO::Socket. But to me,
> it's not a hack, or it's at least less hackish than monkey patching.
> But maybe I'm missing other issues of this implementation ?
> Ithere is a better way, I'd be happy to change the implementation.

FWIW, I would take an ugly interface over a cute, but subtle and/or
intrusive interface any day.


More information about the Redis mailing list