![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re: Spoof /dev/ttyS0by grinder (Bishop) |
on Sep 24, 2008 at 14:05 UTC ( #713433=note: print w/replies, xml ) | Need Help?? |
Point of linguistic order: you don't want to spoof /dev/ttyS0 because that would mean you want to fool it into accepting an alternate version of reality. In the context of a device, this might mean getting it to read or write bytes it wasn't meant to, which doesn't make a whole lot of sense. What you really want to do is to mock /dev/ttyS0, so that innocent bystanders think they are writing to a serial device driver, when in fact they're writing to your Perl program. At one level this is rather trivial, just move the existing /dev/ttyS0 out of the way and install a FIFO in its place. On the other hand, this might annoy real users of the real serial port. Can you not arrange your code to use some existsing test harness like Test::Device::SerialPort?. • another intruder with the mooring in the heart of the Perl
In Section
Seekers of Perl Wisdom
|
|