
Mojolicious::Plugin::Redis - Simply use Redis in Mojolicious

Version 0.03

To install this module, run the following commands:
perl Build.PL
./Build
./Build test
./Build install

Provides a few helpers to ease the use of Redis in your Mojolicious application.
use Mojolicious::Plugin::Redis
sub startup {
my $self = shift;
$self->plugin('redis', {
server => 'localhost:6379',
debug => 0,
encoding => undef, # Disable the automatic utf8 encoding => much more performance
helper => 'db'
});
}

helper (optional) The name to give to the easy-access helper if you want to change it's name from the default
no_helper (optional) When set to true, no helper will be installed.
All other options passed to the plugin are used to connect to Redis. In other words ANY option can be sended to Redis module.

This plugin attribute holds the Redis::Connection object, use this if you need to access it for some reason.
This helper will return the database handler. If you have renamed the helper, use that name instead of 'db' in the example below :)
sub someaction {
my $self = shift;
# ping Redis server
$self->db->PING();
# get value of 'foo' named key
$self->db->GET('foo');
}

http://github.com/Meettya/Mojolicious-Plugin-Redis

Meettya, meettya@cpan.org

Please report any bugs or feature requests to bug-mojolicious-plugin-redis at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mojolicious-Plugin-Redis. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc Mojolicious::Plugin::Redis
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mojolicious-Plugin-Redis

Ben van Staveren (inspiration from Mojolicious::Plugin::Mongodb), so I didn't have to write it myself, just copy-paste. Sergey Zasenko for test fix.

Copyright 2011 Meettya, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.