rishi has asked for the wisdom of the Perl Monks concerning the following question:
I have a script that runs as a Windows Service using the Win32::Daemon module.
It works absolutely fine when it is just running on it's own. However, now I want to call a subroutine in a custom module I wrote. Let's call this module MyParser.pm
The file is located in the same folder as MyService.pl
When I add the the following line use MyParser; the service fails to startup anymore. I can get around that using use lib "$RealDir/";, though I don't understand why I have to.
But the service still automatically stops when I add MyParser->parse($myinput) into the SERVICE_RUNNING code block.
Any suggestions on what my problem could be?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with using Modules in script
by tuxz0r (Pilgrim) on Nov 29, 2007 at 01:03 UTC | |
|
Re: Problems with using Modules in script
by ikegami (Patriarch) on Nov 29, 2007 at 01:07 UTC | |
|
Re: Problems with using Modules in script
by aquarium (Curate) on Nov 29, 2007 at 03:15 UTC |