The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Catalyst::Helper::Model::UserConfig - Helper Class to generate Catalyst Models intefacing User::Config

SYNOPSIS

  myapp_create.pl Model Configuration UserConfig [DB_Type] [DB_Args]

DESCRIPTION

This will create a new model-class within a catalyst app. DB_Type may be replaced one of the User::Config::DB. DB_Args depend on them. currently supported are the following types

Mem

This will use the default memory backed database interface. This doesn't support any arguments.

DBIC

This will use DBIx::Class for the storage of the values. The db-args will be the connection-string needed to connect to the database.

  myapp_create.pl Model Configuration UserConfig DBIC dbi:SQlite:database.db MyApp::Schema MyResulSet

The order for the arguments is the database-string, the schema-class and the resultset. See User::Config::DB::DBIC

Keyed

This will use a table in a given database for storing all values in a single keyed table. The synopsis would be eg.

  myapp_create.pl Model Configuration UserConfig Keyed dbi:SQlite:database.db tablename

See User::Config::DB::Keyed

Ldap

This will use User::Config::DB::Ldap as store. If only one arg is given, this will be interpreted as code to retrieve a bound Net::Ldap object. Otherwise four parameters are needed as following:

  myapp_create.pl Model Configuration UserConfig Ldap host rootdn binddn bindpwd

In all cases the default parameter counting can be omitted by inserting '--' and adding explicit pairs of keys and values as used in the initializer.

METHODS

mk_compclass

generates the class

mk_comptest

generates tests for the new class

SEE ALSO

Catalyst

User::Config

User::Config::Manual

AUTHOR

Benjamin Tietz <benjamin@micronet24.de>

COPYRIGHT

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.