in reply to (tye)Re: Win32::Daemon
in thread Win32::Daemon
I recently used Win32::Daemon to create a connection between a Linux client and an NT database. It might have been quicker to use DBI::Proxy, but I learned more this way. I had some problems with my script, which might have been detected had I used something like this BEGIN block.
I deliberately added a line 'use Blarfle;' to my working script. Blarfle.pm does not exist (well, maybe it does on CPAN... I haven't looked). When I start my service from the control panel (NT 4.0), I get to watch an hour glass until it displays "Error 2186: The service is not responding to the control function."
I added this BEGIN block after the 'use Blarfle;' statement:
# *SNIP*
use Blarfle;
BEGIN {
open(STDERR, ">>d:/daemon.err") or die "invisible error";
warn "$0 started" . localtime() . "\n";
}
# *SNIP*
I didn't get any output in my d:\daemon.err file.
Next, I moved the 'use Blarfle;' so it was after the BEGIN block:
# *SNIP*
BEGIN {
open(STDERR, ">>d:/daemon.err") or die "invisible error";
warn "$0 started" . localtime() . "\n";
}
use Blarfle;
# *SNIP*
Again, I received Error 2186. However, I still didn't see any output in d:\daemon.err.
What did I miss?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re2: Win32::Daemon
by tye (Sage) on Jun 19, 2001 at 09:43 UTC |