http://qs321.pair.com?node_id=383432


in reply to Re^3: DBD::Mock and DBD-specific attributes
in thread DBD::Mock and DBD-specific attributes

Other replies in this thread seem to indicate that lowercase attributes will not be handled unless they have the correct prefix. So, what about adding a check in the two STORE/FETCH subs in DBD::Mock to say "If I don't know about this attribute, but it is in lowercase, I'll store/fetch it for you."?

I went ahead and added this code to my copy and it passed my tests, though you'll probably want to design it a little better than my hackish solution. Specifically, doing a reset on the $dbh should probably delete all the added-on attributes. Plus, I would still like to see a way of mocking a given DBD.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested