I am looking into adding database features to my Perl script and am reading about DBI.
I have a Perl script that is distributed with my application that users copy to their Web server's cgi-bin or scripts folder. The script is pretty straightforward and I have 4 different flavors of it: Perl, ASP PerlScript, executable program for Windows (using ActiveState's PerlApp) and executable program for Linux (using ActiveState's PerlApp). The script works identically on all platforms that support Perl 5, meaning Unix, Linux and all Windows 32-bit platforms.
It's really wonderful that the script requires no additional installation beyond Perl 5 for the script version and nothing at all for the Windows or Linux executable program versions.
These days may be drawing to a close now that I am searching for a way for the script to be configured to access whatever database is on the Web server.
So, I'm reading about DBI, which appears to have a good abstraction layer. But, DBI doesn't appear to be included in default installations of Perl, like ActiveState's ActivePerl, for example.
If this is right, this means that either I need to come up with some sort of installation procedure to install my Perl script with DBI and whatever DBI needs or I need to include instructions to have Webmasters do this.
Reading the Web pages about DBI makes me a little concerned - the pages have not been updated since 2000. Are people working on a successor to DBI or is it just that stable?
I am looking to be able to have my users specify a few parameters for my script to connect to whatever database they have on their Web server. This appears to make DBI a good choice.
But, is DBI a good choice to support Unix, Linux and all Windows 32-bit platforms? I have read that DBI was "recently" ported to Win32.
I have also read a little about DBM, which appears to be the older technology, but also is included by default in Perl installations, including ActiveState's ActivePerl (albeit with a different name?). Having it already installed is attractive to me, but, I have not read that I can use DBM to connect to SQL Server or MS Access.
Is DBI the best (or only) choice for a multi-platform script?
Any pointers or suggestions would be greatly appreciated.
Thank you in advance.
Richard
In reply to To DBI or not to DBI by rzward
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |