On Mon, Jul 21, 2008 at 4:59 AM, Moritz Onken <[EMAIL PROTECTED]> wrote: > But how can I rewrite my query to the other format without writing the raw > sql where clause? > Why is it not possible to write my query with as scalar ref: > > $rs->search({ > -and => > [ > {\"extract(year from age(NOW(),birthday))" => 22}, > {sex => "male"} > ] > });
Because the '=>' operator stringifies it's left operand, thus you'll end up with some perl internal debug value instead of the string you intended. What's the problem with writing raw SQL? -- edenc.vox.com _______________________________________________ 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]