Why not just leave everything in @binds and then at execution time, loop through @binds replacing undefined values with your new ones? What about NULLs though? Neither your solution nor mine leaves the ability to insert things you *want* to be undefined. Maybe you should let
SQL::Abstract build your $where and then ignore what it gives you for @binds and just use your own @binds at execution time. If these won't work for you and you use hard-coded values in the $where, don't forget to use $dbh->quote on them.