Subject: | Can't set DBI::st=HASH(0x1b0cb18)->{ParamValues}: unrecognised attribute name or invalid value |
There seems to be an issue with how the ::st STORE/FETCH methods behave
vs. ::db/dr/etc. The following code produces the following error:
$sth->STORE('ParamValues', { map { $_ => $params->[$_-1]{val} } (1
.. $numParam) });
$sth->STORE('ParamTypes', { map { $_ => $params->[$_-1]{type} } (1
.. $numParam) });
$sth->STORE('ParamArrays', $sth->FETCH('ParamValues'));
Can't set DBI::st=HASH(0x1b0cb18)->{ParamValues}: unrecognised attribute
name or invalid value at ...
Can't set DBI::st=HASH(0x1b0cb18)->{ParamTypes}: unrecognised attribute
name or invalid value at ...
Can't set DBI::st=HASH(0x1b0cb18)->{ParamArrays}: unrecognised attribute
name or invalid value at ...
But, using the syntax of "$sth->{'ParamValues'} = blah" seems to work
fine. Why are these different?
DBI::DBD talks about how important is it to put in the the various
statement handle attributes, but says nothing about this difference.
Either STORE should be changed to work for these statement parameters,
or the DBI::DBD docs should be changed to help driver writers out about
this difference.