tie and tie with IO::Multiplex and Device:SerialPort?
am 11.03.2007 15:55:25 von df4orHi.
My intention is to write a multi-client server for a serial attached device
which supports several streams at once. So IO::Multiplex (or Net::Server,
which uses (among others) IO::Multiplex) is a natural choice.
IO::Multiplex uses tied file handles to select() if ready. That's fine for
sockets, but what about the serial port which I would like to see handled
through IO::Multiplex as well?
Now Device::SerialPort also uses (can use) the serial device with a tied
filehandle.
My question: What happens if I pass the already tied file handle from
Device::SerialPort to IO::Multiplex, which ties it again? Will that work?
What I did so far, to find out
- read the docs and the camel book on Tie over and over, I have zero
experience with tied variables.
What I did not do
- Simply try it out. I fear that it would take quite some time to set up a
test case only to find out that it does not work. So I am asking here.
Thanks for any insights.
Ekki/Germany