khanzada19
asked on
Can't locate Win32/Service.pm in @INC (@INC contains:
I am trying to use same perl script both on Windows and Unix enviornment, it works on windows fine but I get below error on Unix
Can't locate Win32/Service.pm in @INC (@INC contains: /home/s/lib /usr/opt/perl5/lib/5.8.2/a ix-thread- multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_pe rl/5.8.2/a ix-thread- multi /usr/opt/perl5/lib/site_pe rl/5.8.2 /usr/opt/perl5/lib/site_pe rl .) at test.pm line 25.
BEGIN failed--compilation aborted
on test.pm at line 25 I have this entry
use Win32::Service;
I have to comment out above line in order to make it work on Unix, is there a way that I could run the same perl script with having 2 verions (windows and Unix) of it?
I would appreciate your help
Can't locate Win32/Service.pm in @INC (@INC contains: /home/s/lib /usr/opt/perl5/lib/5.8.2/a
BEGIN failed--compilation aborted
on test.pm at line 25 I have this entry
use Win32::Service;
I have to comment out above line in order to make it work on Unix, is there a way that I could run the same perl script with having 2 verions (windows and Unix) of it?
I would appreciate your help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's worth noting that Win32::Service is only going to work on windows systems, so if you try to make use of it in unix it's going to croak.
The code for Morcalavin will let your script run, but there will likely be other errors if you use any functions from the Win32::Service module.
What is it that the script does on windows? What do you want it to do on unix?
What windows calls services are what unix calls daemons. Do you want to monitor a daemon process?
What is it that the script does on windows? What do you want it to do on unix?
What windows calls services are what unix calls daemons. Do you want to monitor a daemon process?