| Revision a57c5d,
496 bytes
checked in by Tomash Brechko <tomash.brechko@…>, 4 years ago
(diff) |
|
Add hash_namespace parameter.
The test t/hash_namespace.t is not added to MANIFEST intentionally.
|
-
Property mode set to
100644
|
| Line | |
|---|
| 1 | use warnings; |
|---|
| 2 | use strict; |
|---|
| 3 | |
|---|
| 4 | use Test::More; |
|---|
| 5 | |
|---|
| 6 | use FindBin; |
|---|
| 7 | |
|---|
| 8 | use lib "$FindBin::Bin"; |
|---|
| 9 | use Memd; |
|---|
| 10 | |
|---|
| 11 | if ($Memd::memd) { |
|---|
| 12 | plan tests => 1; |
|---|
| 13 | } else { |
|---|
| 14 | plan skip_all => 'Not connected'; |
|---|
| 15 | } |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | my %params = %Memd::params; |
|---|
| 19 | $params{hash_namespace} = 1; |
|---|
| 20 | |
|---|
| 21 | my $another_memd = new Cache::Memcached::Fast(\%params); |
|---|
| 22 | |
|---|
| 23 | my $ns = $another_memd->namespace(''); |
|---|
| 24 | my $key = 'hash_namespace'; |
|---|
| 25 | $another_memd->set("$ns$key", 1); |
|---|
| 26 | $another_memd->namespace($ns); |
|---|
| 27 | is($another_memd->get($key), 1); |
|---|
| 28 | |
|---|
| 29 | $another_memd->delete($key); |
|---|
Note: See
TracBrowser
for help on using the repository browser.