Tie::Redis::Attribute - Variable attribute based interface to Tie::Redis
use Tie::Redis::Attribute; my %hash : Redis; # %hash now magically resides in a redis instance
This is an experimental module that implements attribute based tying for Redis.
Currently tying of arrays or hashes is supported.
Options may be specified using perl list syntax within the
However note that attributes cannot use lexical variables, so
my %p : Redis(host = $host)> will unfortunately not work if
$host is lexical.
The key to use, if this isn't provided a key is invented based on the package name and variable name. This means for some simple purposes you may not need to specify a key.
our @queue : Redis(key => "my-queue");
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.
David Leadbeater <firstname.lastname@example.org>
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.