in reply to Re: Supressing error messages on serial port open in Linux
in thread Supressing error messages on serial port open in Linux
{ no warnings 'redefine'; sub Device::SerialPort::carp { }; # no-op }
Please don't do it that way. Always localize the overwriting of subroutines:
{ no warnings 'redefine'; local *Device::SerialPort::carp = sub { # no-op }; $PortObj = new Device::SerialPort($port, 1) or next; } # carp works again
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Supressing error messages on serial port open in Linux
by pashanoid (Scribe) on Sep 05, 2011 at 05:31 UTC | |
|
Re^3: Supressing error messages on serial port open in Linux
by pashanoid (Scribe) on Sep 05, 2011 at 05:52 UTC | |
by Corion (Patriarch) on Sep 05, 2011 at 07:06 UTC |