[Dbix-class] 'without storage' error with txn_do

Eden Cardim edencardim at gmail.com
Fri May 25 20:51:05 GMT 2007


On 5/25/07, Jason Konrad <jason at popularmedia.com> wrote:
> I'm attempting to add transaction support to my Catalyst app which is using
> DBIx but I am getting this error while trying to execute
>
> eval {
>    $rs = kRadDB->txn_do($coderef);
> };
>
>
> 'DBIx::Class::Schema::txn_do(): txn_do called on $schema without storage at'

txn_do() isn't a class method, so you need to run it on a connected
schema instance:

    my $schema = kRadDB->connect(...);
    $schema->txn_do($coderef);

-- 
Eden Cardim
Instituto Baiano de Biotecnologia
Núcleo de Biologia Computacional e Gestão de Informações Biotecnológicas
Laboratório de Bioinformática



More information about the Dbix-class mailing list