Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Win32::Daemon::State returns a 0 or 1

by n3toy (Hermit)
on Jan 05, 2009 at 22:12 UTC ( [id://734296]=note: print w/replies, xml ) Need Help??


in reply to Win32::Daemon::State returns a 0 or 1

I have used Win32::Service and it returns several codes that I use a hash to get a word based status.
my %statcodeHash = ( '1' => 'stopped', '2' => 'start pending', '3' => 'stop pending', '4' => 'running', '5' => 'continue pending', '6' => 'pause pending', '7' => 'paused' ); ... print "Status = $statcodeHash{$statusHash{"CurrentState"}}\n";
Not sure what all Win32::Daemon returns. Maybe this gives you another option.

Jamie

UPDATE: fixed small spelling error

Replies are listed 'Best First'.
Re^2: Win32::Daemon::State returns a 0 or 1
by azaragoza (Acolyte) on Jan 05, 2009 at 22:36 UTC
    You are right this could be another option, but it seems to only return two values '0' and '1', thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://734296]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-23 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found