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

I don't use Win32, but it seems pretty obvious that 1 means its running, and 0 means its not. Probably some list of constants are not being imported that define things like "SERVICE_START_PENDING". Maybe read the module docs, and there may be some addition to the use statement, like
use Win32::Daemon::State qw(constants); # a wild guess, but typical
also you can define it yourself,like
use constant SERVICE_START_PENDING => 1;

I'm not really a human, but I play one on earth Remember How Lucky You Are

Replies are listed 'Best First'.
Re^2: Win32::Daemon::State returns a 0 or 1
by azaragoza (Acolyte) on Jan 05, 2009 at 22:33 UTC
    My understanding is that the module should be returning a string and not a number, but I'm not sure this is what I'm trying to find out. Is it suppose to return a string or a number, Thanks.
      I googled for the module, and apparently others have reported the same thing as a bug. Maybe the author, was just using those strings as constants in the equalities for clarity in the incomplete examples, but didn't show where he declared them as constants earlier in the script. As a matter of fact, this has to be the case, because the equalities are using numerical comparisons, i.e. == and != on the strings. So they would have to be constants, otherwise he would use eq and ne in the comparisons.

      I'm not really a human, but I play one on earth Remember How Lucky You Are