Terr!
While ago i migrated my scripts from CGI-environment to the PerlRun and now i see in my error.log such messages:
--
Can't call method "disconnect" on an undefined value at /adm/tellimus line 1105.
END failed--call queue aborted.
--
Background:
In my scripts i use BEGIN and END blocks, so BEGIN contains code for connect with database and END for disconnect (END doesn't contain anything else, BEGIN has more initializing stuff).
Sample code:
BEGIN { use DBI; $db = "db"; $user = "user"; $password = "pwd"; $hostname = "localhost"; $data_source = "DBI:mysql:$db"; $dbh = DBI->connect($data_source, $user, $password) || die "VIGA\n"; }
END { $rc = $dbh->disconnect; }
This messages in error.log does not appear on every invocation but randomly. I don't see those messages for script in which i moved disconnect to the logical end point. Maybe someone can point out, why it happens with END-block?
My system is Debian GNU/Linux Stable, Apache is 1.3.29, mod_perl 1.29, perl 5.8.3.
--
TIA,
WK
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html