NAME
Bot::IRC::Store::SQLite - Bot::IRC persistent data storage with SQLite
VERSION
version 1.16
SYNOPSIS
use Bot::IRC;
Bot::IRC->new(
connect => { server => 'irc.perl.org' },
plugins => ['Store::SQLite'],
vars => { store => 'bot.sqlite' },
)->run;
DESCRIPTION
This Bot::IRC plugin provides a persistent storage mechanism with a SQLite database file. By default, it's the "store.sqlite" file, but this can be changed with the vars
, store
value.
EXAMPLE USE
This plugin adds a single sub to the bot object called store()
. Calling it will return a storage object which itself provides get()
and set()
methods. These operate just like you would expect.
set
$bot->store->set( user => { nick => 'gryphon', score => 42 } );
get
my $score = $bot->store->set('user')->{score};
SEE ALSO
AUTHOR
Gryphon Shafer <gryphon@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Gryphon Shafer.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.