Add initial support for subscriber mode:
authorPedro Melo <melo@simplicidade.org>
Thu, 5 Aug 2010 16:44:54 +0000 (17:44 +0100)
committerPedro Melo <melo@simplicidade.org>
Thu, 5 Aug 2010 22:46:02 +0000 (23:46 +0100)
commitf8b1b5abfab57c3b3d0e450ebd4e4d2a3cc90c0f
treef2769695140dedd3d7ed9c6520913d9c6adc7f11
parent297a71d7bf0991ea74b60d610f21ff6202d980c6
Add initial support for subscriber mode:

When we use any of SUBSCRIBE commands, we need to restrict the
commands we can use after. Only other SUBSCRIBE, or UNSUBSCRIBE commands
are valid.

We added a "mode", is_subscriber, that default to 0 and will be true after
we subscribe something. When is_subscriber is active, invalid commands
will result in an exception.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
lib/Redis.pm