Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • First off, I view DBD::Mock, Test::MockDBI, and DBI::trace() as complementary, as they each take a somewhat different tack to the same problem.

    Although I finally realize that you can use DBD::Mock for similar purposes as Test::MockDBI, the current documentation (at least) is geared more towards using DBD::Mock as a tracing tool. My docs for Test::MockDBI explicitly stress changing the DBI behavior.

    Plus, DBD::Mock is good for situations where you use configurable data sources, while Test::MockDBI is good when you need to insert DBI debugging code without changing the base code of a program (something I've had to do a lot lately as a consultant).

    My suggestion for DBD::Mock is to stress changing the DBI behavior in the documentation, so as to tease out those edge cases and difficult/impossible to otherwise generate failures. Meanwhile, I will look again at DBD::Mock for what I can learn from it.

    Thanks for your comments!

    • I too see them as complementary (at least as much as I can glean of what Test::MockDBI does). I would actually be very interested in seeing more information on Test::MockDBI if you care to provide it :)

      I am actually planning a re-write parts of the DBD::Mock docs when I have some time to better show some of it's newer features. I will take your suggestions, and also try to stress it's role in testing more as well.

      You are correct that DBD::Mock cannot really insert debugging code, and it only allows s