I was cleaning up my script, before making it public, and I'm reminded of a
possible bug in the OWNet.pm perl library.

Reading the man I thought I understand that calling:

my $ owserver = OWNet->new ("localhost:4303");

while the server is not active, the expected behavior would be that $
owserver is undefined.

But it seems that this does not happen ever.

For now I have found a little workaround:

my $ owserver = OWNet-> new ("localhost: 4304");
print $ owserver-> dir ("/");
if (defined ($ owserver-> {SOCK})) {
     print "ERROR";
}

Only after a bus access (I tested dir) I can check the SOCK definition.

If it is as expected, I'll promote the workaround as "normal check",
otherwise I'll try to dig in the lib :)

Thanks!

Giulio
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to