Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I've used this module of a number of projects myself. However, I've always use the 'input' and 'write' methods, typically with select() for timeouts.

For some code I have written to drive a maniufacturing test platform, I decided to use the tied methods. What a disaster! I resorted to writing my own line buffering routines, and using the 'input' and 'write' methods that had served me so well in the past.

Admittedly, the documentation (which is very strong in some areas, and more than very weak in others) seems to indicate that the tied methods use some code that is less than heavily tested. But still, I'm not sure how the tied methods escaped from the lab, because even for a basic send/expect type protocol, I was having major problems. Which is a shame, because that would be very handy.

The worst is that something like @a = <SERIALPORT> will return empty, even with stty_icanon(1). I think this area needs a lot of help yet. Luckily, it's easy to write your own buffering routines that only return whole complete lines. I'd really like to see it behave more like a real file, and be able to use select() directly on the handle. As near as I could tell from the observed behavior (and not digging into the code because of time constraints), it doesn't actually give access to the file handles of the port object. Hence, select() can't be applied to it.


e-mail jcwren

In reply to (jcwren) Re: Win32 Serial Communication by jcwren
in thread Win32 Serial Communication by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2022-07-03 06:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found