Win32::Daemon relies upon a dll, Daemon.dll which if the installation on your development machine is correct, you should find installed in
X:/perl/site/lib/auto/win32/daemon/
or somewhere similar. I've never used 5.005, so I am unsure whether the blib paths were different back then.
Adding the contents of Win32::Daemon.pm to the top of your script would work and be trivial, but the seems little point it adding its 20k to your script to save "polluting the install", when you would need to place a 72/76 kb binary in the appropriate place in the perl directory tree anyway. In any case, the general method of using Win32::Daemon appears to be to have two scripts: The first is the deamon itself (which used Win32::Daemon) and the second is a short script to install the first (which also needs Win32::Daemon). So, all you would be doing is wasting 20k of space. Whilst it wouldn't be too hard to combine the install and service scripts into one, the next time you want to create another service script your back to square one.
The bottom line is that you are going to have to put Deamon.dll somewhere. You might get away will placing it in on a server somewhere and loading it across the network to each machine, though your going to have to play some nasty tricks with Dynaloader.pm to make that work. You might even encode the dll using mime64 or similar and tack it onto the end of your script and reconstitute it at run-time, but the chances of making this work at all, never mind reliably are pretty darn slim.
In reply to Re: Can I include a package as part of my script?
by BrowserUk
in thread Can I include a package as part of my script?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |