|We don't bite newbies here... much|
Re^3: Problem with Threaded Socket Serverby BrowserUk (Pope)
|on Aug 18, 2013 at 21:04 UTC||Need Help??|
Just saw your update:
So the idea is to create a new Device::SerialPort class which inherits the original class and overrides the destructor, right?
That is the essence of the first of the two possibilities I offered. And you could go the full subclassing route if that's your thing. Personally, I wouldn't.
You'll get a "subroutine redefined" warning -- which you can disable -- but the affect will be the same as 'doing it properly' without the hassle.
Simply commenting out the #$self->close; may be enough. If not, then you will either have to investigate why not; or try my second suggestion.
Don't forget to call close() in the same thread as you created the USB connection before finishing.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.