David Leadbeater > Tie-Redis-0.26 > Tie::Redis::Attribute

Download:
Tie-Redis-0.26.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.26   Source  

NAME ^

Tie::Redis::Attribute - Variable attribute based interface to Tie::Redis

VERSION ^

version 0.26

SYNOPSIS ^

  use Tie::Redis::Attribute;

  my %hash : Redis; # %hash now magically resides in a redis instance

DESCRIPTION ^

This is an experimental module that implements attribute based tying for Redis.

Currently tying of arrays or hashes is supported.

OPTIONS ^

Options may be specified using perl list syntax within the Redis(...) attribute.

However note that attributes cannot use lexical variables, so my %p : Redis(host = $host)> will unfortunately not work if $host is lexical.

Other options are as per Tie::Redis's constructor (prefix) and AnyEvent::Redis (host, port, encoding).

METHODS ^

server

You may subclass this and define a server method that returns an instance of Tie::Redis. Due to the tricky nature of attributes it is recommended to not define an import method in your subclass other than the one provided by this class.

SEE ALSO ^

Tie::Redis, Attribute::Tie, Attribute::TieClasses.

AUTHOR ^

David Leadbeater <dgl@dgl.cx>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by David Leadbeater.

This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Beer-ware license revision 42.

syntax highlighting: