Permalink
Browse files

Updated the code using sockets.

Still broken :-|
  • Loading branch information...
1 parent 0155914 commit 520687cee51c11f4196d4a46c7db4e7a9b614572 @cosimo committed May 10, 2011
Showing with 7 additions and 10 deletions.
  1. +1 −1 META.info
  2. +1 −2 README
  3. +5 −7 lib/Cache/Memcached.pm
View
@@ -1,6 +1,6 @@
{
"name" : "Cache::Memcached",
- "version" : "0.03",
+ "version" : "0.04",
"description" : "Port of Cache::Memcached from Perl 5 to Perl 6",
"depends" : [ "String::CRC32" ],
"author" : "Cosimo Streppone",
View
3 README
@@ -9,6 +9,5 @@ Based on CPAN version 1.29
Current status (2010/07/29)
===========================
-Started yesterday.
-Nothing functional yet.
+Still broken.
View
@@ -1,7 +1,7 @@
use v6;
use String::CRC32;
-class Cache::Memcached:auth<cosimo>:ver<0.03>;
+class Cache::Memcached:auth<cosimo>:ver<0.04>;
=begin pod
use Storable ();
@@ -347,15 +347,13 @@ method _connect_sock ($sock, $sin, $timeout = 0.25) {
#my $ret = connect($sock, $sin);
# TODO FIXME
- my $hostname = 'localhost';
+ my $host = 'localhost';
my $port = 11211;
- my $sock_obj = IO::Socket::INET.new;
- my $ret = $sock_obj.open($hostname, $port, :bin);
+ my $sock_obj = IO::Socket::INET.new(:$host, :$port);
# TODO non-blocking sockets support yanked for now
-
- return $ret;
+ return $sock_obj;
}
=begin pod
@@ -1221,7 +1219,7 @@ sub _hashfunc {
=end pod
sub _hashfunc(Str $key) {
- my $crc = String::CRC32.crc32($key);
+ my $crc = String::CRC32::crc32($key);
$crc +>= 16;
$crc +&= 0x7FFF;
return $crc;

0 comments on commit 520687c

Please sign in to comment.