team-at-cpan / net-async-redis Goto Github PK
View Code? Open in Web Editor NEWPerl module
Home Page: http://search.cpan.org/perldoc?Net-Async-Redis
License: Other
Perl module
Home Page: http://search.cpan.org/perldoc?Net-Async-Redis
License: Other
As per subject. Grep: http://search.cpan.org/grep?release=Net-Async-Redis-1.000;string=Test::HexString;n=1;C=0
Sample fail report: http://www.cpantesters.org/cpan/report/89951080
Thanks,
Due to different wire format for psubscribe payloads as compared regular subscribe ones, the "payload" field of the message actually contains the channel name, rather than the payload.
The compile test may fail if Math::Random::Secure is not installed:
# Failed test 'Net/Async/Redis/Server/Database.pm loaded ok'
# at t/00-compile.t line 51.
# got: '512'
# expected: '0'
Can't locate Math/Random/Secure.pm in @INC (you may need to install the Math::Random::Secure module) (@INC contains: ... .) at /tmpfs/.cpan-build-cpansand/2017122609/Net-Async-Redis-1.003-0/blib/lib/Net/Async/Redis/Server/Database.pm line 19.
BEGIN failed--compilation aborted at /tmpfs/.cpan-build-cpansand/2017122609/Net-Async-Redis-1.003-0/blib/lib/Net/Async/Redis/Server/Database.pm line 19.
Compilation failed in require at -e line 1.
# Looks like you failed 1 test of 9.
t/00-compile.t .........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/9 subtests
The connect
method takes host
, port
and auth
parameters directly (though doesn't document them). It would be convenient to take them as configured parameters for more traditional constructor or configure use-cases.
When trying to use a Redis Cloud provider like Aiven.io, I'm not able to authenticate with the following example due to mutations to the URI. Please note that Aiven.io requires and extra "s" for the "rediss://" start of the URI.
When tracing out the URI of "rediss://username:[email protected]:16031"
was changed to "redis://rediss:6379//username:[email protected]:16031"
Also, the authentication parameters also have the username removed before trying to authenticate. This makes using ACL authentication not possible.
Example Code:
use warnings;
use Future::AsyncAwait;
use IO::Async::Loop;
use Net::Async::Redis;
my $redis = Net::Async::Redis->new(
uri => 'rediss://username:[email protected]:16031'
);
$loop->add($redis);
$redis->connect()->then(sub {
print("#connected! \n");
})->on_fail(sub {
my $error = shift;
print("Redis connection error : $error \n");
})->get;
If the URI does not have the redis://...
scheme, then code later fails:
Can't locate object method "userinfo" via package "URI::_generic" at .../lib/perl5/Net/Async/Redis.pm line 250.
A quite simple fix for this is something like
$uri = "redis://$uri" unless $uri =~ m{^redis://};
Or maybe have the URI checked/rejected by the configure method?
Makes IO_ASYNC_DEBUG=1 ...
output useful things
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.