http://www.perlmonks.org?node_id=1206607


in reply to Re^2: DBIx::Class Build a Where Clause with multiple ORs and ANDs
in thread DBIx::Class Build a Where Clause with multiple ORs and ANDs

This logic is always TRUE

-or => [ sent_email => {'!=', undef }, sent_email => {'!=', '0000-00-00'} ],

for it to be FALSE the sent_email must be both undefined AND '0000-00-00' which is not possible. I think you want

-or =>[ status => 'Review' , -and => [ -or => [ status => 'Offered', status => 'Denied', status => 'Cancelled', status => 'Conditional Offer', ], sent_email => {'!=', undef }, sent_email => {'!=', '0000-00-00'}, ], ],
poj