in reply to Anyone familiar with DBD:Mock?

From the POD: "There is no distinct area where using this module makes sense..." and I tend to agree. I would make my real data for tests in CSV and use DBD::CSV in my test scripts instead.

Celebrate Intellectual Diversity

Replies are listed 'Best First'.
Re^2: Anyone familiar with DBD:Mock?
by cavac (Prior) on Feb 17, 2025 at 12:57 UTC

    DBD::SQlite might also work fine. There are lots of tools to edit a SQLite database by hand. I use sqlitebrowser for that.

    Of course, it rather depends on what OP is trying to achieve. Very basic SQL statements should works the same (more or less) in every database. Mocking a specific SQL dialect is a lot harder, and so is error handling. And trancactions.

    Unless there are specific reasons to simulate a database, my recommendation would be to use the real thing for development. Many databases have support for bulk insertion of data, so it would not be too complicated to load a bunch of test data. See my use of COPY for PostgreSQL: Re: [OT] The Long List is Long resurrected

    PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
    Also check out my sisters artwork and my weekly webcomics