Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #211258

Re: Upgrade to Buster and perl Device::SerialPort

From David Christensen <dpchrist@holgerdanske.com>
Newsgroups linux.debian.user
Subject Re: Upgrade to Buster and perl Device::SerialPort
Date 2019-07-12 02:40 +0200
Message-ID <yiRLr-4yA-5@gated-at.bofh.it> (permalink)
References <yi6CR-xj-1@gated-at.bofh.it> <yia3L-2oh-1@gated-at.bofh.it> <yioJr-2Ut-15@gated-at.bofh.it> <yixtn-rv-1@gated-at.bofh.it> <yiCCK-3ER-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 7/11/19 1:29 AM, tomas@tuxteam.de wrote:
> On Wed, Jul 10, 2019 at 07:53:23PM -0700, David Christensen wrote:
>> On 7/10/19 10:39 AM, Martin McCormick wrote:
>>> David Christensen <dpchrist@holgerdanske.com> writes:
> 
> [...]
> 
> Good points all around.
> 
>> I would check for existence of the device (-e) and die if not present.
> 
> Perhaps even check whether the device is character special (-c): ISTR
> the code tries to do some stty stuff which will fail otherwise.

I have always tried to do thorough error checking.  In the past, I have 
taken argument and/or state checking to the extreme.  Currently, I tend 
to do more moderate argument/ state checking and depend upon the error 
checking code to deal with the advanced and/or corner cases -- e.g. "let 
it crash", but capture all details required for a postmortem analysis.


> OTOH it would preclude you to run the code (e.g. as a test) against a
> FIFO: but then the failed attempt at stty should be non-fatal.

Perl, and its testing infrastructure, are especially amenable to 
designing and coding for testability.


David

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Upgrade to Buster and perl Device::SerialPort "Martin McCormick" <martin.m@suddenlink.net> - 2019-07-10 00:20 +0200
  Re: Upgrade to Buster and perl Device::SerialPort David Christensen <dpchrist@holgerdanske.com> - 2019-07-10 04:00 +0200
    Re: Upgrade to Buster and perl Device::SerialPort "Martin McCormick" <martin.m@suddenlink.net> - 2019-07-10 19:40 +0200
      Re: Upgrade to Buster and perl Device::SerialPort David Christensen <dpchrist@holgerdanske.com> - 2019-07-11 05:00 +0200
        Re: Upgrade to Buster and perl Device::SerialPort <tomas@tuxteam.de> - 2019-07-11 10:30 +0200
          solved! Upgrade to Buster and perl Device::SerialPort "Martin McCormick" <martin.m@suddenlink.net> - 2019-07-11 21:30 +0200
            Re: solved! Upgrade to Buster and perl Device::SerialPort David <bouncingcats@gmail.com> - 2019-07-12 05:40 +0200
          Re: Upgrade to Buster and perl Device::SerialPort David Christensen <dpchrist@holgerdanske.com> - 2019-07-12 02:40 +0200
            Re: Upgrade to Buster and perl Device::SerialPort <tomas@tuxteam.de> - 2019-07-12 10:10 +0200

csiph-web