r46164 - in /branches/upstream/libcache-memcached-perl/current: ChangeLog META.yml Makefile.PL lib/Cache/Memcached.pm
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Wed Oct 21 22:35:18 UTC 2009
Author: jawnsy-guest
Date: Wed Oct 21 22:35:10 2009
New Revision: 46164
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46164
Log:
[svn-upgrade] Integrating new upstream version, libcache-memcached-perl (1.28)
Modified:
branches/upstream/libcache-memcached-perl/current/ChangeLog
branches/upstream/libcache-memcached-perl/current/META.yml
branches/upstream/libcache-memcached-perl/current/Makefile.PL
branches/upstream/libcache-memcached-perl/current/lib/Cache/Memcached.pm
Modified: branches/upstream/libcache-memcached-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcache-memcached-perl/current/ChangeLog?rev=46164&op=diff
==============================================================================
--- branches/upstream/libcache-memcached-perl/current/ChangeLog (original)
+++ branches/upstream/libcache-memcached-perl/current/ChangeLog Wed Oct 21 22:35:10 2009
@@ -1,3 +1,9 @@
+2009-10-21: version 1.28
+
+ * IPv6 support (https://rt.cpan.org/Ticket/Display.html?id=50577)
+
+ * Add Encode.pm requirement to Makefile.PL for perl 5.6.x (Ask).
+
2009-09-22: version 1.27
* Fix get() with utf-8 keys (athomason)
Modified: branches/upstream/libcache-memcached-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcache-memcached-perl/current/META.yml?rev=46164&op=diff
==============================================================================
--- branches/upstream/libcache-memcached-perl/current/META.yml (original)
+++ branches/upstream/libcache-memcached-perl/current/META.yml Wed Oct 21 22:35:10 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Cache-Memcached
-version: 1.27
+version: 1.28
abstract: client library for memcached (memory cache daemon)
license: ~
author:
@@ -8,6 +8,7 @@
generated_by: ExtUtils::MakeMaker version 6.42
distribution_type: module
requires:
+ Encode: 0
Storable: 0
String::CRC32: 0
Time::HiRes: 0
Modified: branches/upstream/libcache-memcached-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcache-memcached-perl/current/Makefile.PL?rev=46164&op=diff
==============================================================================
--- branches/upstream/libcache-memcached-perl/current/Makefile.PL (original)
+++ branches/upstream/libcache-memcached-perl/current/Makefile.PL Wed Oct 21 22:35:10 2009
@@ -5,6 +5,7 @@
'Storable' => 0,
'Time::HiRes' => 0,
'String::CRC32' => 0,
+ 'Encode' => 0,
},
($] >= 5.005 ?
(ABSTRACT_FROM => 'lib/Cache/Memcached.pm',
Modified: branches/upstream/libcache-memcached-perl/current/lib/Cache/Memcached.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcache-memcached-perl/current/lib/Cache/Memcached.pm?rev=46164&op=diff
==============================================================================
--- branches/upstream/libcache-memcached-perl/current/lib/Cache/Memcached.pm (original)
+++ branches/upstream/libcache-memcached-perl/current/lib/Cache/Memcached.pm Wed Oct 21 22:35:10 2009
@@ -1,4 +1,4 @@
-# $Id: Memcached.pm 827 2009-09-22 05:29:08Z bradfitz $
+# $Id: Memcached.pm 833 2009-10-21 21:51:10Z bradfitz $
#
# Copyright (c) 2003, 2004 Brad Fitzpatrick <brad at danga.com>
#
@@ -35,11 +35,12 @@
# size savings required before saving compressed value
use constant COMPRESS_SAVINGS => 0.20; # percent
-use vars qw($VERSION $HAVE_ZLIB $FLAG_NOSIGNAL);
-$VERSION = "1.27";
+use vars qw($VERSION $HAVE_ZLIB $FLAG_NOSIGNAL $HAVE_SOCKET6);
+$VERSION = "1.28";
BEGIN {
$HAVE_ZLIB = eval "use Compress::Zlib (); 1;";
+ $HAVE_SOCKET6 = eval "use Socket6 qw(AF_INET6 PF_INET6); 1;";
}
my $HAVE_XS = eval "use Cache::Memcached::GetParserXS; 1;";
@@ -231,7 +232,9 @@
return $cache_sock{$host} if $cache_sock{$host};
my $now = time();
- my ($ip, $port) = $host =~ /(.*):(\d+)/;
+ my ($ip, $port) = $host =~ /(.*):(\d+)$/;
+ $ip =~ s/[\[\]]//g; # get rid of optional IPv6 brackets
+
return undef if
$host_dead{$host} && $host_dead{$host} > $now;
my $sock;
@@ -244,10 +247,19 @@
{
# if a preferred IP is known, try that first.
if ($self && $self->{pref_ip}{$ip}) {
- socket($sock, PF_INET, SOCK_STREAM, $proto);
- $sock_map{$sock} = $host;
my $prefip = $self->{pref_ip}{$ip};
- $sin = Socket::sockaddr_in($port,Socket::inet_aton($prefip));
+ if ($HAVE_SOCKET6 && index($prefip, ':') != -1) {
+ no strict 'subs'; # for PF_INET6 and AF_INET6, weirdly imported
+ socket($sock, PF_INET6, SOCK_STREAM, $proto);
+ $sock_map{$sock} = $host;
+ $sin = Socket6::pack_sockaddr_in6($port,
+ Socket6::inet_pton(AF_INET6, $prefip));
+ } else {
+ socket($sock, PF_INET, SOCK_STREAM, $proto);
+ $sock_map{$sock} = $host;
+ $sin = Socket::sockaddr_in($port, Socket::inet_aton($prefip));
+ }
+
if (_connect_sock($sock,$sin,$self->{connect_timeout})) {
$connected = 1;
} else {
@@ -260,11 +272,20 @@
# normal path, or fallback path if preferred IP failed
unless ($connected) {
- socket($sock, PF_INET, SOCK_STREAM, $proto);
- $sock_map{$sock} = $host;
- $sin = Socket::sockaddr_in($port,Socket::inet_aton($ip));
+ if ($HAVE_SOCKET6 && index($ip, ':') != -1) {
+ no strict 'subs'; # for PF_INET6 and AF_INET6, weirdly imported
+ socket($sock, PF_INET6, SOCK_STREAM, $proto);
+ $sock_map{$sock} = $host;
+ $sin = Socket6::pack_sockaddr_in6($port,
+ Socket6::inet_pton(AF_INET6, $ip));
+ } else {
+ socket($sock, PF_INET, SOCK_STREAM, $proto);
+ $sock_map{$sock} = $host;
+ $sin = Socket::sockaddr_in($port, Socket::inet_aton($ip));
+ }
+
my $timeout = $self ? $self->{connect_timeout} : 0.25;
- unless (_connect_sock($sock,$sin,$timeout)) {
+ unless (_connect_sock($sock, $sin, $timeout)) {
my $cb = $self ? $self->{cb_connect_fail} : undef;
$cb->($ip) if $cb;
return _dead_sock($sock, undef, 20 + int(rand(10)));
More information about the Pkg-perl-cvs-commits
mailing list