Perl 5.6.1, DBI 1.20, DBD-Oracle 1.12
I have this simple program that was working fine yesterday. This morning
I'm
getting odd problems. The only database connection I make is the very
simple
query I make in the 'getHosts()' sub. The query seems to run fine - I get
results and I can step to the next line. Neither $! nor $@ are set - the
disconnect appears to work fine.
However, as soon as I try to step into the "someOtherSub()" sub, the program
dumps me into the Oracle.pm module. I never even get to the first line of
"someOtherSub()". It dies *at* that line, at the moment I try and step into
it
with ptkdb.
Any ideas? Thanks in advance for any help.
Sincerely,
Mr. Sunblade
# Dumps me here first...
# Oracle.pm, starting at line 66
END {
# Used to silence 'Bad free() ...' warnings caused by bugs in Oracle's
code
# being detected by Perl's malloc.
$ENV{PERL_BADFREE} = 0;
undef $Win32::TieRegistry::Registry if $Win32::TieRegistry::Registry;
}
# ...then here
# DBI.pm, starting at line 348
END{
return unless defined &DBI::trace_msg; # return unless bootstrap'd ok
local ($!,$?);
DBI->trace_msg(" -- DBI::END\n", 2);
# Let drivers know why we are calling disconnect_all:
$DBI::PERL_ENDING = $DBI::PERL_ENDING = 1; # avoid typo warning
DBI->disconnect_all() if %DBI::installed_drh
}
# Command line output
Bareword found where operator expected at (eval 16) line 8, near "00351
DBI"
(Missing operator before DBI?)
Number found where operator expected at (eval 16) line 10, near "00352 #
Let
drivers know why we are calling disconnect_all:
00353"
(Missing operator before # Let drivers know why we are calling
disconnect_all:
00353?)
Scalar found where operator expected at (eval 16) line 10, near "# Let
drivers
know why we are calling disconnect_all:
00353 $DBI::PERL_ENDING"
(Missing operator before $DBI::PERL_ENDING?)
Bareword found where operator expected at (eval 16) line 11, near "# avoid
typo
warning
00354 DBI"
(Missing operator before DBI?)
Can't locate object method "FIRSTKEY" via package "DBI::DBI_tie" (perhaps
you
forgot to load "DBI::DBI_tie"?) at /usr/local/lib/perl5/5.6.1/Devel/ptkdb.pm
line 3305, <FH> line 7.
END failed--call queue aborted, <FH> line 7.
--------------------------
# Program snippet that causes this - nothing special.
my $hosts = getHosts();
# $option is just a string.
someOtherSub($hosts) if $option; # CRASHES HERE
sub getHosts{
my @hosts;
my $dbh = DBI->connect("dbi:Oracle:$database",$login,$passwd,
{RaiseError=>1,PrintError=>1},
);
my $sth = $dbh->prepare("select host_name, ip_addr from app_host");
$sth->execute();
while( my $ref = $sth->fetchrow_hashref() ){
push(@hosts,$ref);
}
$sth->finish();
$dbh->disconnect();
return \@hosts;
}
"Nothing great was ever designed by committee"
- Me
"Nothing great was ever designed by committee"
- Me