Good day,
I've built perl 5.6.1 on Tru64 then built DBI and DBD as per the
instructions. When I try to run perl I get
DBD::mSQL initialisation failed: Can't locate object method "driver" via
package "DBD::mSQL" (perhaps you forgot to load "DBD::mSQL"?) at
/usr/local/gnu/packages/perl-5.6.1-db/lib/site_perl/5.6.1/alpha-dec_osf/DBI.pm
line 619.
Perhaps the capitalisation of DBD 'mSQL' isn't right. at
../hughes-test.pl line 8
-----------------------------------
I suspect that either the modules didn't fully install or I'm missing
something in my path. I appreciate your help. Thanks.
------------------------------------
Specific versions are:
c compiler use to build perl:
# cc -V
Compaq C V6.3-027 on Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.3-026 (sys) cc Driver
Msql-Mysql-modules-1.2219
DBI-1.28
Data-ShowTable-3.3
The perl version shows:
qxms:~ [130] > perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=dec_osf, osvers=5.1, archname=alpha-dec_osf
uname='osf1 qxms v5.1 1885 alpha '
config_args='-Ui_db'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
Compiler:
cc='cc', ccflags ='-std -fprm d -ieee -D_INTRINSICS
-I/usr/local/include -DLANGUAGE_C',
optimize='-O4',
cppflags='-std -ieee -D_INTRINSICS -I/usr/local/include
-DLANGUAGE_C'
ccversion='V6.3-027', gccversion='', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc
/usr/lib /var/shlib
libs=-ldbm -ldb -lm -liconv -lutil
perllibs=-lm -liconv -lutil
libc=/usr/shlib/libc.so, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-rpath,/usr/local/gnu/packages/perl-5.6.1-db/lib/5.6.1/alpha-dec_osf/CORE'
cccdlflags='USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES',
lddlflags='-shared -expect_unresolved "*" -O4 -msym -std -s
-L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
Built under dec_osf
Compiled at Jul 24 2002 13:22:35
@INC:
/usr/local/gnu/packages/perl-5.6.1-db/lib/5.6.1/alpha-dec_osf
/usr/local/gnu/packages/perl-5.6.1-db/lib/5.6.1
/usr/local/gnu/packages/perl-5.6.1-db/lib/site_perl/5.6.1/alpha-dec_osf
/usr/local/gnu/packages/perl-5.6.1-db/lib/site_perl/5.6.1
/usr/local/gnu/packages/perl-5.6.1-db/lib/site_perl
.
--------------------
I tried to attach files showing the perl build but the mail gets bounced
saying that my message is too long. If you need those files, send me an
email address to which I can send them.
------------------
A sample code and it's full output follows:
qxms:~ [132] > ./hughes-test.pl
/usr/local/gnu/packages/perl-5.6.1-db/lib/5.6.1/alpha-dec_osf
/usr/local/gnu/packages/perl-5.6.1-db/lib/5.6.1
/usr/local/gnu/packages/perl-5.6.1-db/lib/site_perl/5.6.1/alpha-dec_osf
/usr/local/gnu/packages/perl-5.6.1-db/lib/site_perl/5.6.1
/usr/local/gnu/packages/perl-5.6.1-db/lib/site_perl .
DBD::mSQL initialisation failed: Can't locate object method "driver" via
package "DBD::mSQL" (perhaps you forgot to load "DBD::mSQL"?) at
/usr/local/gnu/packages/perl-5.6.1-db/lib/site_perl/5.6.1/alpha-dec_osf/DBI.pm
line 619.
Perhaps the capitalisation of DBD 'mSQL' isn't right. at
../hughes-test.pl line 8
Source Code:
qxms:~ [133] > cat hughes-test.pl
#!/usr/local/gnu/packages/perl-5.6.1-db/bin/perl
use DBI;
print "\n@INC\n\n";
$dsn = "DBI:mSQL:database=test;host=";
$dbh = DBI->connect($dsn, undef, undef);
$sth = $dbh->prepare("SELECT * FROM staff");
$sth->execute;
my $names = $sth->{'NAME'};
my $numFields = $sth->{'NUM_OF_FIELDS'};
for (my $i = 0; $i < $numFields; $i++)
{
printf("%s%s", $$names[$i], $i ? "," : "");
}
print "\n";
while (my $ref = $sth->fetchrow_arrayref)
{
for (my $i = 0; $i < $numFields; $i++)
{
printf("%s%s", $$ref[$i], $i ? "," : "");
}
print "\n";
}
--
Diane Madrid
Los Alamos National Laboratory
CCN-7 MS B289
Los Alamos, NM 87545
(505)667-9337 fax (505)665-6333