in reply to Is bind useful for one-time queries and commands?

I never use bind. It smells too much of action at a distance.

And as far as type-checking is concerned, I understood it is implemented at the DBD level, so it may be there or partially there or not at all depending on the driver you use, so it is not fully portable. On the other hand I may have to read-up on the docs of the latest version of DBI ...

Better to do these typechecks yourself, esp. on data that may be tainted.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: Is bind useful for one-time queries and commands?
by Your Mother (Archbishop) on May 18, 2008 at 22:38 UTC
    Better to do these typechecks yourself, esp. on data that may be tainted.

    …seems like poor advice. It amounts to: I'm sure those of you here to take this advice know what you are doing better than the 100s of contributors and bug reporters over the last 10 years to the various DBD projects. So don't rely on them, start from scratch.

    Anyone with that level of expertise -- guaranteed to get it right -- should instead read the DBD source(s) and contribute patches if necessary. Anyone without that level of expertise should pretty much expect to get it wrong or miss edge cases compared to what's there already.

      Oh no not at all, I just meant to say that in my understanding --which may be wrong-- the typechecking is not at the same level in all of the DBD-modules and thus it would be dangerous to generally rely on it unless you have checked that this feature is fully implemented.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James