Hello there, thanks for some fine software.

We have an an embperl application running on embperl 1.2b7, mod_perl
1.21, Apache 1.3.6 .  Its .epl files use an in-house Perl module called
Axe.pm by calling
    [! use Axe; !]

This module's BEGIN block tries to connect to a database:
  $Axe::Connection::dbh = DBI->connect(bunch of parameters) or
    die('Axe::Connection cannot connect to Oracle!');

Everything works most of the time.  Sometimes this DB connection fails
in one of the Apache child processes.  But that Apache process continues
to run despite the die().  Whenever the embperl application happens to
run in that Apache instance, it has all kinds of problems because the
required module didn't initialize successfully.

1.  How can I get the failure in the BEGIN module to kill that Apache
process?  Calling die() and exit from embperl don't kill it.

2.  I suspect there's a better way to do this, by loading the Axe module
in Apache's startup.pl.  I believe the original developer tried that,
and had problems because we wanted each child Apache process to have its
own connection to the database.  Should I instead use the Apache::DBI
wrapper as suggested in the mod_perl docs, or are there even better ways
to do per-child initialization with embperl?

Many thanks.

--
=S Page  Macromedia Web site engineer
  "A heap of seemingly inanimate objects may one day be able to morph
  into whatever shape is needed to perform the task at hand."
  -- Xerox studies self-assembling modular robots,
     http://www.eetimes.com/story/OEG20000110S0070


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to