On Wed, May 16, 2001 at 05:22:45PM +0100, Tim Bunce wrote:
> I guess I could add an option to available_drivers() to have it hide
> drivers that are 'installed' but fail to load.
D'oh. Forget that thinko. What it needs is an eval around the
data_sources method call.
Tim.
> Tim.
>
> On Wed, May 16, 2001 at 08:56:00AM -0500, Spohn, Albert F. wrote:
> > My initial install of DBI 1.15 bundle went without an apparent hitch. I
> > then attempted to run the following code from the O'Reilly Perl DBI book to
> > see what drivers were installed (expecting to see either 'none' or maybe one
> > that came with the DBI 1.15 bundle). My knee-jerk reaction was to try to
> > install a driver, then try again - so I tried the Sybase 0.91 DBD, but it
> > wouldn't install cleanly... so I figured I better address the initial issue
> > first. At any rate, here's the code:
> >
> > #!/usr/bin/perl -w
> > use DBI;
> >
> > my @drivers = DBI->available_drivers();
> >
> > die "No drivers found!\n" unless @drivers;
> >
> > foreach my $driver (@drivers ) {
> > print "Driver: $driver\n";
> > my @dataSources = DBI->data_sources ($driver);
> > foreach my $dataSource ( @dataSources ) {
> > print "\tData Source is $dataSource\n";
> > }
> > print "\n";
> > }
> > exit;
> >
> > Here's the error I'm getting:
> >
> > Driver: ADO
> > install_driver(ADO) failed: Can't locate Win32/OLE/Variant.pm in @INC (@INC
> > contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/pe.
> > BEGIN failed--compilation aborted at
> > /usr/lib/perl5/site_perl/5.005/i386-linux/DBD/ADO.pm line 562.
> > Perhaps a module that DBD::ADO requires hasn't been fully installed
> > at ./dbi_test line 10
> >
> > Here's my perl -V info:
> >
> > Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
> > Platform:
> > osname=linux, osvers=2.2.14-5.0, archname=i686-linux
> > uname='linux jesse 2.2.14-5.0 #1 tue mar 7 21:07:39 est 2000 i686
> > unknown '
> > config_args=''
> > hint=recommended, useposix=true, d_sigaction=define
> > usethreads=undef use5005threads=undef useithreads=undef
> > usemultiplicity=undef
> > useperlio=undef d_sfio=undef uselargefiles=define
> > use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
> > Compiler:
> > cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
> > (egcs-1.1.2 release)
> > cppflags='-fno-strict-aliasing'
> > ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE
> > -D_FILE_OFFSET_BITS=64'
> > stdchar='char', d_stdstdio=define, usevfork=false
> > intsize=4, longsize=4, ptrsize=4, doublesize=8
> > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
> > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> > lseeksize=8
> > alignbytes=4, usemymalloc=n, prototype=define
> > Linker and Libraries:
> > ld='cc', ldflags =' -L/usr/local/lib'
> > libpth=/usr/local/lib /lib /usr/lib
> > libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
> > libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
> > Dynamic Linking:
> > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
> > cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
> >
> >
> > Characteristics of this binary (from libperl):
> > Compile-time options: USE_LARGE_FILES
> > Built under linux
> > Compiled at Mar 31 2001 23:48:51
> > @INC:
> > /usr/local/lib/perl5/5.6.0/i686-linux
> > /usr/local/lib/perl5/5.6.0
> > /usr/local/lib/perl5/site_perl/5.6.0/i686-linux
> > /usr/local/lib/perl5/site_perl/5.6.0
> > /usr/local/lib/perl5/site_perl
> > .
> >
> > Many thanks to whomever was willing to wade through this junk! Any help
> > would be appreciated, of course.
> >
> > - Al
> >
> > Al Spohn
> > Publishing and Media Technology Services
> > Mayo Clinic 507-284-1666