|Syntactic Confectionery Delight|
Re^5: Recalcitrant placeholdersby haukex (Bishop)
|on Jul 09, 2021 at 19:51 UTC||Need Help??|
Those unrelated things have to be there.
That logically doesn't make sense ;-)
The main issue is that your code relies on libraries that we don't have - the most important thing to keep in mind is that we need to be able to run the code and reproduce the issue ourselves.
The problem goes away if I turn off taint mode...
Well that's certainly interesting and might indicate a bug somewhere. Unfortunately I was unable to reproduce the issue you're seeing as well, which means the issue may be somewhere outside of the code you've shown here.
I would consider as a bare minimum that you inline the code of $crm->db, remove the other dependencies, and show the output of Data::Dumper (with $Data::Dumper::Useqq=1;) of %data.
Also, GrandFather, afoken, and kcott all commented that both the selectrow_array and fetchrow_array documentation state "If called in a scalar context for a statement handle that has more than one column, it is undefined whether the driver will return the value of the first column or the last. So don't do that." really do mean you shouldn't be doing that*. Stated a little differently, you shouldn't be surprised that this undefined behavior is biting you. It may not even be worth trying to debug this and instead just using the API the way the documentation says you should...
* Update: Yes, even if you only have one column. afoken's point that the documentation clearly warns you away from scalar context is important.