Perl DBI without accessing the database

前端 未结 6 1942
悲哀的现实
悲哀的现实 2021-01-18 16:08

I\'m creating a set of SQL INSERT statements for a database that doesn\'t exist yet, and I\'m saving them to file.

How can I use Perl\'s powerful DBI m

6条回答
  •  暖寄归人
    2021-01-18 16:54

    You could use DBD::CSV or DBD::AnyData as a dummy database. SQLite is good for this purpose, too.

    A hidden advantage of using SQLite here is that it's a semi-real database, and will tend to make you write code in a way that's decoupled from any specific database.

提交回复
热议问题