On 6/1/07, Ryan VanderBijl <[EMAIL PROTECTED]> wrote:
Hi,
I'm getting the following error:
    "Can't call method "storage" on an undefined value at
    /usr/local/share/perl/5.8.8/DBIx/Class/ResultSource.pm line 442."

I'm using version DBIx::Class version 0.07006.

This is within a Catalyst application.

I have my schema setup with IcAccount, and IcGazetteer. The IcAccount
has_many IcGazetteer.  Normally this works. E.g:
    my $account = $c->model("db::IcAccount")->find({account_id => 1});
    my @entries = $account->gazetteer_entries;


However, the following will produce the above error:
    my $account = $c->model("db::IcAccount")->find({account_id => 1});
    $c->session->{"account"} = $account;

    # ... new page request

    # Optional: doesn't work with or without:
    # my $source = $c->model("db")->schema->source("IcAccount");
    # $c->session->{"account"}->result_source( $source );
    # or
    # $c->session->{"account"}->set_simple( "result_source", $source );

    my @entries = $c->session->{"account"}->gazetteer_entries;

Any suggestions?


What version did it last work on?

Hmm, I also just noticed that this gives me an error:
    my $account = $c->model("db::IcAccount")->find({account_id => 1});
    my @entries = $account->gazetteer_entries;
    $c->session->{"account"} = $account;
produces:
    [Fri Jun  1 16:09:26 2007] [catalyst] [error] Caught exception in engine
    "Can't store CODE items at blib/lib/Storable.pm (autosplit into
    blib/lib/auto/Storable/_freeze.al) line 290, at
    /usr/local/share/perl/5.8.8/DBIx/Class/Serialize/Storable.pm line 10, at
    /usr/local/share/perl/5.8.8/Object/Signature.pm line 19"


Is this with Storable 2.15 or 2.16?

-- Brandon

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to