User::Config::DB::DBIC - Use an DBIx::Class schema to store the user-configuration data.
use User::Config; my $uc = User::Config->instance; $uc->db("DBIC", { schema => "My::DBIC::Schema", db => "dbi:SQLite:user.sqlite", resultset => "Configuration", });
This assumes you want the resultset My::DBIX::Schema::ResultSet::Confiuration to store your options.
My::DBIX::Schema::ResultSet::Confiuration
This is a database-backend for User::Config. How the options get stored in which table will be defined using a DBIx::Class schema and some optional helper-routines.
All attributes are read-only and should be given at the time of initialization.
This attribute contains a DBI-string to connect to the database. Its presence is mandatory.
This contains the name of the schema used to interact with the database. Mandatory.
The name of the resultset within the schema to use. Mandatory.
The name of the primary key to use for filtering for a certain user. Optional. Default: "uid"
These optional attributes will contain the username and password needed to connect to the database.
<$db-
assigns the value for the given user to the option within a package. See User::Config::DB
returns the set value. See User::Config::DB
User::Config DBIx::Class User::Config::DB
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::DBIC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm User::Config::DB::DBIC
CPAN shell
perl -MCPAN -e shell install User::Config::DB::DBIC
For more information on module installation, please visit the detailed CPAN module installation guide.