mons / anyevent-memcached Goto Github PK
View Code? Open in Web Editor NEWAnyEvent memcached client
Home Page: http://search.cpan.org/dist/AnyEvent-Memcached
License: Other
AnyEvent memcached client
Home Page: http://search.cpan.org/dist/AnyEvent-Memcached
License: Other
Call of $memd->get(undef, cb => sub { my ($val, $err) = @_; ... })
raises Use of uninitialized value within @_ in list assignment
warning.
I'm not shure that it is an error. But…
The reason for this is that if $key
is undef
in _get()
method then $args{cb}( $array ? \%res : $res{ $keys } );
calls with one undefined argument (not undef
value).
So may be you wouldn't send request to the server if key isn't defined. Like this:
sub _get {
my $self = shift;
my $cmd = shift;
my $keys = shift;
my %args = @_;
unless (defined($keys)) {
$_ and $_->begin() for $self->{cv}, $args{cv};
$args{cb}(undef);
$_ and $_->end() for $self->{cv}, $args{cv};
return;
}
...
}
Call of $memd->get([], ...)
doesn't set the condition variables to true. The reason of this is that in _get()
method my $servers = $self->{hash}->servers($keys, for => 'get');
returns empty list of servers so request to server doesn't send and callback doesn't call. But begin()
method for condition variables already called and end()
method never be call.
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.