in reply to Re^4: Strange bug involving mysql, auto_increment, Class::DBI and Test::MockObject
in thread Strange bug involving mysql, auto_increment, Class::DBI and Test::MockObject

In the scenario you describe, there is no reason that your test script would inherit from Class::DBI or that your CDBI class would use T::MO. Using T::MO and calling CDBI objects in the same test script is not a problem, and my company does this in our tests without issues. That is not what is being shown in this example. Mutant is using T::MO from a Class::DBI class, not from a test script.

I am honestly not trying to be difficult and I have no stake involved in the success of T::MO or CDBI, but I really don't see any reason to use these modules in the way that is shown here. The whole point of T::MO is that the modules being tested don't even know it's being used.

  • Comment on Re^5: Strange bug involving mysql, auto_increment, Class::DBI and Test::MockObject