# get the current attributes $ok = $self->{TERMIOS}->getattr($self->{FD}); unless ( $ok ) { carp "can't getattr: $!"; undef $self; return undef; } #### { no warnings 'redefine'; sub Device::SerialPort::carp { }; # no-op } ... $PortObj = new Device::SerialPort($port, 1) or next;