{ 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
In reply to Re^2: Supressing error messages on serial port open in Linux
by Corion
in thread Supressing error messages on serial port open in Linux
by pashanoid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |