Skip Menu |

This queue is for tickets about the CHI-Driver-Redis CPAN distribution.

Report information
The Basics
Id: 106162
Status: open
Priority: 0/
Queue: CHI-Driver-Redis

People
Owner: ianburrell [...] gmail.com
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.09
Fixed in: (no value)



Subject: Default port
It seems to me that if the server argument is given an IP address only, that the port should default to 6379. This would make it consistent with CHI::Driver::Memcached which defaults to 11211 if you don't give a port number.
On Thu Jul 30 17:42:49 2015, NHORNE wrote: Show quoted text
> It seems to me that if the server argument is given an IP address > only, that the port should default to 6379. This would make it > consistent with CHI::Driver::Memcached which defaults to 11211 if you > don't give a port number.
Default port would be nice, but I'm not sure this module is the right place for it. CHI::Driver::Redis is a simple wrapper around Redis module and passes through the "server" option. In fact, I think CHI::Driver::Redis shouldn't be setting default value for "server" but let Redis.pm handle it especially since it is possible to not use "server" option. My feeling is that it would be better to add support for default port in Redis module. It looks like Redis module uses "server" attribute as IO::Socket::INET PeerAddr without any processing. I think it is possible to use PeerPort for default port: IO::Socket::INET->new(PeerAddr => $self->{server}, PeerPort => 6379);