in reply to Re^4: Help needed with WIN32::Service
in thread Help needed with WIN32::Service
Re: Getting perl to report errors - as others have indicated, the Win32:: code apparently does not place the errors in $!.
Instead, you need something like:
use Win32::Service; use Win32; ... if (! Win32::Service::GetStatus($host, $serviceName, \%status)){ die "Cannot get $serviceName status : $!\nWin Error:" . Win32::GetL +astError() . "\n"; }
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Help needed with WIN32::Service
by the_hawk_1 (Scribe) on Jun 29, 2010 at 17:51 UTC |