[Dbix-class] Bug in Catalyst::Model::DBIC::Schema ?

Oleg Pronin syber.rus at gmail.com
Wed Aug 26 18:43:22 GMT 2009


Hello.

I've just upgraded to last cat & dbic & related and i get error with my model.
I use custom DBI class for my DB connection persistence

package Myapp::Model::General;
use parent 'Catalyst::Model::DBIC::Schema';
use strict;
use DBIx::RetryOverDisconnects;

__PACKAGE__->config(
    schema_class => 'Myapp::Schema',
    connect_info => [
        sub {DBIx::RetryOverDisconnects->connect(...)},
        {
            quote_char => q{"},
            name_sep   => q{.},
        },
    ],
);

DBIx::Class::Storage::DBI docs:
A single code reference which returns a connected DBI database handle
optionally followed by extra attributes recognized by DBIx::Class:
  $connect_info_args = [ sub { DBI->connect (...) }, \%extra_attributes? ];


But with newest Catalyst::Model::DBIC::Schema i get error:

Couldn't instantiate component "Myapp::Model::General", "invalid
connect_info at
/usr/local/lib/perl5/site_perl/5.10.1/Catalyst/Model/DBIC/Schema/Types.pm
line 86.

It seems that Catalyst/Model/DBIC/Schema/Types.pm does not support SUB
REF in connect info anymore. Is that a bug or feature ?

Thanks.



More information about the DBIx-Class mailing list