<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Catalyst::TraitFor::Model::DBIC::Schema::ConnectInfo::Several - support
    for several "connect_info" entries.

SYNOPSIS
        package MyApp::Model::DB;

        use Moose;
        use namespace::autoclean;
        extends 'Catalyst::Model::DBIC::Schema';

        __PACKAGE__-&gt;config(
            {
                traits            =&gt; ['ConnectInfo::Several'],
                schema_class      =&gt; 'MyApp::Schema',
                connect_info      =&gt; {
                    active_connection =&gt; 'mysql_devel',
                    mysql_devel       =&gt; [ 'dbi:mysql:db_devel', 'user1', 'pass1' ],
                    mysql_production  =&gt; [ 'dbi:mysql:db_prod',  'user2', 'pass2' ],
                },
            }
        );

        #
        # or in application config
        #
        &lt;Model::DB&gt;
            &lt;connect_info&gt;
                active_connection   mysql_devel
                &lt;mysql_devel&gt;
                    dns             dbi:mysql:db_devel
                    user            user1
                    password        pass1
                &lt;/mysql_devel&gt;
                &lt;mysql_prod&gt;
                    dns             dbi:mysql:db_prod
                    user            user2
                    password        pass2
                &lt;/mysql_prod&gt;
            &lt;/connect_info&gt;
        &lt;/Model::DB&gt;

DESCRIPTION
    Enable "connect_info" to be hash with several named connections defined
    inside, and choose active one with "active_connection". Also, set
    "AutoCommit" option for you to 1, if you don't set it yet.

    This extension will do something only if you set "active_connection",
    otherwise it just do nothing, like it was not used at all.

TODO
    Write tests.

REPOSITORY
    Project is hosted at GitHub:

        git://github.com/cub-uanic/c-t-m-dbic-schema-connectinfo-several.git

SEE ALSO
    Catalyst::Model::DBIC::Schema, DBIx::Class, Catalyst

AUTHOR
    Oleg Kostyuk, "&lt;cub at cpan.org&gt;"

COPYRIGHT &amp; LICENSE
    Copyright 2009 Oleg Kostyuk.

    This program is free software; you can redistribute it and/or modify it
    under the terms of either: the GNU General Public License as published
    by the Free Software Foundation; or the Artistic License.

    See http://dev.perl.org/licenses/ for more information.

</pre></body></html>