Андрій Костенко > Cache-Memcached-Tie-0.07 > Cache::Memcached::Tie

Download:
Cache-Memcached-Tie-0.07.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.07   Source   Latest Release: Cache-Memcached-Tie-0.08

NAME ^

Cache::Memcached::Tie - Use Cache::Memcached::Fast like hash.

SYNOPSIS ^

    #!/usr/bin/perl -w
    use strict;
    use Cache::Memcached::Tie;
    
    my %hash;
    my $default_expiration_in_seconds = 60;
    my $memd = tie %hash,'Cache::Memcached::Tie', $default_expiration_in_seconds, {servers=>['192.168.0.77:11211']};
    $hash{b} = ['a', { b => 'a' }];
    print $hash{'a'};
    print $memd->get('b');

    #Also we can work with slices:
    @hash{ 'a' .. 'z' } = ( 1 .. 26 );
    print join ',', @hash{ 'a' .. 'e' }; 

DESCRIPTION ^

Memcached works like big dictionary... So why we can't use it as Perl hash?

AUTHOR ^

Andrii Kostenko <andrey@kostenko.name<gt>

COPYRIGHT AND LICENSE ^

GNU GPL