User::Config::DB::Keyed - Store User-Configuration in a large Key-Value-Table.
use User::Config; my $uc = User::Config->instance; $uc->db("Keyed", { table => "user", db => "dbi:SQLite:user.sqlite" });
This is a database-backend for User::Config. The options will be stored within a table consisting of - at least - three columns:
The names of these columns as well of the tables are configurable. Further columns wont be touched.
All attributes are read-only and should be given at the time of initialization.
This attribute must be given and contain the name of the table within the database to use.
This attribute must be given, too. It consits of a DBI-string to connect to the database.
These attributes contain optional username and password for the database-connection
this will contain the names of the columns used to store the user, item and value. The default values are shown above.
<$db-
assigns the value for the given user to the option within a package. See User::Config::DB
Checks wether the option was set. See User::Config::DB
retrieves the currently set value. See User::Config::DB
User::Config User::Config::DB DBI
Benjamin Tietz <benjamin@micronet24.de>
Copyright (C) 2011 by Benjamin Tietz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
To install User::Config::DB::Keyed, copy and paste the appropriate command in to your terminal.
cpanm
cpanm User::Config::DB::Keyed
CPAN shell
perl -MCPAN -e shell install User::Config::DB::Keyed
For more information on module installation, please visit the detailed CPAN module installation guide.