[Dbix-class] Lazy loading of attributes

Jesper Krogh jesper at krogh.cc
Mon Nov 21 18:55:48 CET 2005


Hi.

There 2 small patches that implements lazy-loading of attributes in
DBIx::Class (and Loader). This is my first try with DBIx::Class but it was
actually extremely easy (when I got some help on IRC and from Matt).

Please comment .. :-)

Usage:
my $loader = new DBIx::Class::Loader(
    dsn => $conf->{dsn},
    password => $conf->{password},
    user => $conf->{user},
    options => { AutoCommit => 1},
    lazy_columns => { tablename => [qw/attribute1 attribute2/] },
    debug => 1,
    relationships => 1
);


Jesper

-- 
Jesper Krogh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbix-class-loader.patch
Type: text/x-patch
Size: 2519 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20051121/93250bb5/dbix-class-loader.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbix-class.patch
Type: text/x-patch
Size: 2592 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20051121/93250bb5/dbix-class.bin


More information about the Dbix-class mailing list