Changeset 11305
- Timestamp:
- 05/09/08 23:51:30 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Cache-Memcached-libmemcached/trunk/lib/Cache/Memcached/libmemcached.pm
r9665 r11305 37 37 foreach my $method qw(set add replace prepend append cas) { 38 38 eval <<" EOSUB"; 39 sub $method { shift->memcached_$method(\@_[0, 1], int(\$_[2] || 0)) } 39 sub $method { 40 my \$self = shift; 41 \$self->memcached_$method(\$self->{namespace} . \$_[0], \$_[1], int(\$_[2] || 0)) 42 } 40 43 EOSUB 41 44 die if $@; … … 76 79 $self->set_hashing_algorithm( $args->{hashing_algorithm} ) if exists $args->{hashing_algorithm}; 77 80 $self->set_distribution_method( $args->{distribution_method} ) if exists $args->{distribution_method}; 81 82 $self->{namespace} = $args->{namespace} || ''; 78 83 79 84 return $self; … … 101 106 $self->memcached_server_add_unix_socket( $server ); 102 107 } 108 } 109 110 sub get 111 { 112 my $self = shift; 113 my $key = shift; 114 $self->SUPER::get($self->{namespace} . $key, @_); 103 115 } 104 116
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)