-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicit username/password support #11
Comments
If a password attr is given to new, Redis.pm will automatically send the AUTH command after every connection. First part of #11, but behaviour with auto-reconnect and tests still not finished. Signed-off-by: Pedro Melo <melo@simplicidade.org>
I didn't include this into the 1.950 release. I still want to think a bit what to do when the password fails and we have auto-reconnect on. Should we just keep trying? or just really really die? Also I want to add proper tests, but I want to fix #13 before doing so. Right now the code is in the auto_auth branch if you want to experiment. Just pass |
I responded to an email question about this just now. In my reply I suggested using this as a temporary solution. Please note, I did not test this but "it should work"™ :) package My::Redis;
use strict;
use base 'Redis';
sub __connect {
my $self = shift;
$self->SUPER::__connect(@_);
$self->auth('your_password');
return;
}
1; |
Hello, |
End of this week... I hope to have some free time friday to do a new release, I have several small fixes piled up. |
Great, many thanks :) |
If a password attr is given to new, Redis.pm will automatically send the AUTH command after every connection. First part of #11, but behaviour with auto-reconnect and tests still not finished. Signed-off-by: Pedro Melo <melo@simplicidade.org>
If you create your Redis instance with a bad password, it will die with a stacktrace. We also disable reconnect to prevent loops. (updates #11) Signed-off-by: Pedro Melo <melo@simplicidade.org>
Fixed with 1.952, on the way to CPAN. |
Moved from RT: https://rt.cpan.org/Ticket/Display.html?id=75562
On Mon Mar 05 19:34:12 2012, ETHER wrote:
True, it should.
Agreed.
It is on Github. And thanks for pointing out that the information is not in the documentation. Time to convert that dist to Dist::Zilla to avoid this oversights.
http://github.com/melo/perl-redis/
Feel free to send pull requests, I'm planning on working on Redis the next weekend, to make a release next week. At least the auth information in the constructor would be nice to have.
Bye
The text was updated successfully, but these errors were encountered: