On Thu, Mar 14, 2013 at 12:13:17AM +0000, brew wrote:
> Yes that is a good improvement, thanks.
> 
> For my case I would need the year to be a bind variable which
> doesn't look like it is possible

The "proper" way to do this will come at some point (frew: poke poke), 
it just isn't as easy as it seems on the surface. However there are two 
workarounds for what you want to do currently:

*) The coderef is just that - a coderef. Have it refer to some external 
variable that you local()ize when you need it, and have it throw if you 
did not set a value when you had to.

*) Use the 'bind' $rs attribute (which is really from_bind_postamble) as 
described here: 
https://colinnewell.wordpress.com/2013/02/14/adhoc-parameters-to-joins-in-dbixclass/

Cheers

_______________________________________________
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/dbix-class@lists.scsys.co.uk

Reply via email to