Acquiring the DBI and Drivers
Before you can use a DBI driver module, you obviously need to get it from somewhere and install it on your system.
If you’re on a Microsoft Windows system and using the ActiveState version of Perl, then the first thing to try is their Perl Package Manager , or PPM for short. The PPM utility is installed with ActiveState Perl and greatly simplifies downloading and installing pre-compiled modules. Installing a DBI driver using PPM also automatically installs the DBI if it’s not already installed. For more information refer to:
| http://www.activestate.com/PPM/ |
That simple solution won’t work for everyone. If you’re not using ActiveState Perl on Microsoft Windows, or the driver you want isn’t one that they have pre-compiled for downloading via PPM, then you’ll have to travel the longer road: download the source code for the driver and build it yourself. It’s usually not as hard as it may sound.
The source code for DBI drivers can be downloaded from any site that is part of the Comprehensive Perl Archive Network (CPAN). Here are a few handy URLs to get you started:
| http://www.perl.com/CPAN/modules/by-module/DBD/ |
| http://www.perl.org/CPAN/modules/by-module/DBD/ |
| http://search.cpan.org/search?mode=module&query=DBD |
If you’ve not already installed the DBI, then you’ll need to do that first. Simply substituting DBI for DBD in the URLs above will take you to the source code for the DBI module.
Remember that many drivers for database systems require some database-specific ...