[Dbix-class] [DBIx::Class] problems after update of Loader to 03003

Daniel McBrearty danielmcbrearty at gmail.com
Fri Jun 30 01:13:38 CEST 2006


hi

few probs since updating this module :

1. I used to use load_from_connection in Schema.pm ... now I get a
warning, it's deprecated. OK, so I change to the new way ... :

my $schema = My::Schema->connect( .... );

and I get an error:

Can't use an undefined value as a HASH reference at
/usr/local/share/perl/5.8.7/DBIx/Class/Schema/Loader.pm line 154.

doesn't mean much to me. any clues what could cause this?

(The relevant source in Loader is:

sub clone {
    my $self = shift;

    my $clone = $self->next::method(@_);

    $clone->_loader_args($self->_loader_args);
    $clone->_loader_args->{schema} = $clone;
    weaken($clone->_loader_args->{schema});

    $clone;
}

to save you looking ... )

2. if I go back to load_from_connection and ignore the warning,
classes load OK, as before. BUT it seems as if in my old code:

my $schema = "My::Schema";
$schema->storage->on_connect_do(["SET NAMES 'utf8'"]);

it now looks as if the "set names utf8" is not happening (I get some
utf8 errors later). This was definitely OK before the update.

Again, any clues?

thanks

Daniel



-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Dbix-class mailing list