Perl weenie needed

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.
Feb 4, 2000
3,281
0
0
Visit site
I have to install Perl on my computer with the "DBI database interface module for Perl" I am told the scripts I have to run connect to a msSQL7 database. Anyone have the install for it? I do already have the basic install for Perl. I just need the DBI.
 

Mute

All you have to do is smile!
It's simple sapphire... once you have perl already installed go to a dos prompt (start->run type in 'cmd' and hit enter)

at the c:\> prompt type in 'ppm'
at the ppm prompt type 'install DBI' this IS case sensative. this will automatically fetch the DBI module from cpan over the web and install it.

You don't seem to indicate that you need a specific DBD (database driver) other than the defaults (and i didn't see a specific DBD-MySQL driver) so hopefully you're done.

To make certain that you have DBI installed (and all the Database Drivers you need) you can run this little program:

Code:
#!/bin/perl
#
use DBI;
my @drivers = DBI->available_drivers();
die "No drivers found!\n" unless @drivers;
foreach my $driver ( @drivers ) {
    print "Driver: $driver\n";
    if (!($driver =~ /Proxy/)) {
	my @dataSources = DBI->data_sources( $driver );
	foreach my $dataSource ( @dataSources ) {
	    print "\tData Source is $dataSource\n";
	}
    }
    print "\n";
}
print "hit enter to finish";
$wait=<STDIN>;
 

Mute

All you have to do is smile!
SC is probably used to having to download the individual modules and makeing and installing them himself on linux. Windows is light years ahead of NT in user friendly perl module installation (about the only thing it's better at- which it's only better at because it's next to impossible to make and install them by hand on Nt if you actually wanted to do so). Use the ppm command i mentioned above and it will do the installation for you.

trust me... i do so much perl database work i could install an apache mod_perl server + oracle database interfaces with my eyes closed and both hands tied behind my back while typing with my nose :p.
 
Feb 4, 2000
3,281
0
0
Visit site
mute,
Lets see if I have this straight:

I install the basic perl
Then unzip the DBI thing
Then I type PPM in the dir I unzipped in


Also, which one of these many things do I need to install?
 

Mute

All you have to do is smile!
Hi Sapph, hopefully you figured it out overnight- you don't need to download any module at all... that's not necessary in windows (although what IS necessary is an internet connection, which i assume you have). From start to end this is all you have to do:

1) download and install the latest version on perl for windows ( http://www.activestate.com/ ).
2) At the dos prompt type ppm
3) At the ppm prompt type install DBI. This will go to CPAN, download the module, uncompress, and install it for you.
4) Test the DBI and default drivers with the little perl script I posted above.

You had it pretty much correct- just the unecessary step of downloading a module yourself by hand- so hopefully everything is working good already!
 
Feb 4, 2000
3,281
0
0
Visit site
Mute,
I installed perl and it went fine. But when I go into ppm and type "install DBI" I get an error "Error installing package 'DBI': Could not locate a PPD file for package DBI"

It might be the firewall blocking it. Is there a way I can download it and run the install directly on my machine?