use Device::SerialPort; ... sub get_ports { my( $selfOrClass ) = shift; ...