Cap'n Steve has asked for the
wisdom of the Perl Monks concerning the following question:
I'm working on a project where sometime in the future I'd like it to work with multiple database systems, and it seems like a good idea to lay the groundwork now. My question is, what do you think would be the best way to do this?
I was thinking about having a queries directory, with sub-directories below that for each system, and then text files containing the appropriate queries. Then, to run the query, I'd just need something like $db->fetch('get_newest_links') before running it through the standard DBI methods.
But how should I organize it? Should I have one query stored per file? Should I group some together or just read every query on every page load to save time?