From: Al Newkirk Date: Sat, 6 Nov 2010 21:53:55 +0000 (-0700) Subject: explain how to use HashRefInflator with search X-Git-Tag: v0.08125~39 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=630ba6e5b8cb098e3991e34f6d4ac7e9234639b1;p=dbsrgits%2FDBIx-Class.git explain how to use HashRefInflator with search --- diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index d1ce294..7de97c0 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -234,6 +234,8 @@ aherzog: Adam Herzog Alexander Keusch +alnewkirk: Al Newkirk + amiri: Amiri Barksdale amoore: Andrew Moore diff --git a/lib/DBIx/Class/ResultClass/HashRefInflator.pm b/lib/DBIx/Class/ResultClass/HashRefInflator.pm index 6d019ad..dd56130 100644 --- a/lib/DBIx/Class/ResultClass/HashRefInflator.pm +++ b/lib/DBIx/Class/ResultClass/HashRefInflator.pm @@ -14,7 +14,16 @@ DBIx::Class::ResultClass::HashRefInflator - Get raw hashrefs from a resultset my $rs = $schema->resultset('CD'); $rs->result_class('DBIx::Class::ResultClass::HashRefInflator'); while (my $hashref = $rs->next) { - ... + ... + } + + OR as an attribute: + + my $rs = $schema->resultset('CD')->search({}, { + result_class => 'DBIx::Class::ResultClass::HashRefInflator', + }); + while (my $hashref = $rs->next) { + ... } =head1 DESCRIPTION