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

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.
  • Comment on Re^2: Win32::Daemon::State returns a 0 or 1

Replies are listed 'Best First'.
Re^3: Win32::Daemon::State returns a 0 or 1
by zentara (Cardinal) on Jan 05, 2009 at 22:41 UTC
    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