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

Regardless of how it works under the hood, if I set an attribute to $x, then ask for that attribute back, I should get $x, unless the docs indicate that the given attribute does something based on $x.
No, not with databse handle attributes AFAIK. DBI leaves the handling of all lower_cased handle attributes (method attributes are a different thing) to the drivers. If you set an attribute that the driver doesn't know about, the driver shouldn't be expected to give it back to you. In fact, the driver probably shouldn't allow you to set it. stvn you might consider adding code to ::db::STORE that dies if someone tries to set an unknown attribute.
  • Comment on Re^3: DBD::Mock and DBD-specific attributes

Replies are listed 'Best First'.
Re^4: DBD::Mock and DBD-specific attributes
by stvn (Monsignor) on Aug 16, 2004 at 19:47 UTC
    stvn you might consider adding code to ::db::STORE that dies if someone tries to set an unknown attribute

    I would agree with you in the context of a normal DBD, but with DBD::Mock, the ability to catch and store driver specific attributes is probably a feature more than it is a bug. I am still thinking about the best way to handle this.

    -stvn