I'm using DBI 1.37 and DBD::Ingres 0.38 to connect to Ingres using a user who doesn't have access to ingres. I'm getting a warning when running with perl -w

$ perl -w foo.pl
Use of uninitialized value in concatenation (.) or string at /opt/perl5.6.1/lib/site_perl/5.6.1/sun4-solaris/DBI.pm line 584.
Connect failed - E_US18FF User authorization check failed. Your user identifier was not known to this installation. Contact your system manager for further assistance. (Wed Nov 19 17:03:57 2003)


The second line of output is from my code. The uninitialized value comes from $drh->errstr being undef at line 584.

I tried substituting $DBI::errstr for $drh->errstr and the warning went away. Is this the correct thing do to do? I can post my sample code if needed.

--- /opt/perl5.6.1/lib/site_perl/5.6.1/sun4-solaris/DBI.pm Thu May 15 13:48:56 2003
+++ DBI.pm Wed Nov 19 17:45:45 2003
@@ -581,7 +581,7 @@
my $dbh;
unless ($dbh = $drh->$connect_meth($dsn, $user, $pass, $attr)) {
$user = '' if !defined $user;
- my $msg = "$class connect('$dsn','$user',...) failed: ".$drh->errstr;
+ my $msg = "$class connect('$dsn','$user',...) failed: $DBI::errstr";
DBI->trace_msg(" $msg\n");
unless ($attr->{HandleError} && $attr->{HandleError}->($msg, $drh, $dbh)) {
Carp::croak($msg) if $attr->{RaiseError};



Thanks.


Reply via email to