Hi,

I have the problem that DBIx::Class::ResultSet::WithMeta solves, but
in my case the fact that it is always iterating over the results kills
performance quite a bit. I was wondering about using a object in the
call to result_class(). Sure, the docs tells us that it should be a
class, but as long as your object does respond properly to new() and
inflate_result() it should be possible to do something like this:

  my $meta = MyWithMeta->new;
  $meta->add(sub { ... your code per row goes here ... });
  ## optionally allow for multiple
  $meta->add(sub { ... other code per row ... });

  $rs->result_class($meta);

Then you get your $meta->inflate_result called per row, only at the
last point in the search() chain.

Thoughts?

Bye
-- 
Pedro Melo
http://www.simplicidade.org/
xmpp:[email protected]
mailto:[email protected]

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

Reply via email to