[DBIx-Class-Devel] [dbix-class] add ResultSet::rs to force scalar context (#68)

Alexander Hartmaier notifications at github.com
Wed Nov 19 07:45:14 GMT 2014


It seems the documentation doesn't make it clear that you can call search_rs without any parameters on a resultset just to get a copy of it, doc patch welcome.

A predefined search usually means a resultset method that returns another resultset of the same or a related class with some filtering applied. If you use search inside those you will get the context sensitivity, to force scalar context you can either use 'scalar' in front of the predefined search call (better performance) or add '->search_rs' to it just like you proposed with '->rs' which will create a copy of the just created resultset (worse performance).

---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class/pull/68#issuecomment-63603219
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20141118/17771839/attachment.htm>


More information about the DBIx-Class-Devel mailing list