Skip to content

Expose DBI::st's hash interface through StatementHandle

Marek Szuba requested to merge experimental/dbi_st_hash into version/2.5

Created by: muffato

Applications need to access DBI::st hash values (like $sth->{Active}) and the recent change in StatementHandle broke those. Here we reenable the hash interface by redirecting all the calls to the statement handle.

In the end, I think this is the best solution as it provides backwards compatibility for all existing code. In fact, you can notice that the AUTOLOAD was basically already redirecting all the method calls to the DBI::st instance, so it makes sense redirecting the hash methods too !

I have expanded a unit-test to also check some of those sth variables (Active and NAME) and they work !

I think I could then close Ensembl/ensembl#270 ?

Merge request reports