| [reply] [d/l] |
There's one in DBI that annoys me on occasion, and that's do($statement, \%attr, @bind_values);. In my code, I haven't found any use of that method where I needed to pass attributes, but I do have a fair number where I use bind values. Example:
$dbh->do('update some_table set some_column=?', undef, $some_string);
| [reply] [d/l] [select] |
Perfect example of a bad api (I'm assuming that your experience of rarely needing \%attr is widespread.)
Maybe there is scope for the addition of a doBind() to the api that reverses the ordering of the last two parameters. Or just omits the second.
But named parameters would be no advantage:
$dbh->do(
sql => 'update some_table set some_column=?',
bind => [ $some_string ]
);
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |