Skip Menu |

This queue is for tickets about the Win32-SerialPort CPAN distribution.

Report information
The Basics
Id: 128922
Status: new
Priority: 0/
Queue: Win32-SerialPort

People
Owner: Nobody in particular
Requestors: chris.softley [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Error in POD for status method example
Date: Sat, 23 Mar 2019 14:54:26 +0000
To: bug-Win32-SerialPort [...] rt.cpan.org
From: Chris Softley <chris.softley [...] gmail.com>
Hello, many thanks for an extremely useful package. I observed the following issue in the example provided in the POD documentation for the status method (line 2013): =head2 Operating Methods ($BlockingFlags, $InBytes, $OutBytes, $LatchErrorFlags) = $PortObj->status || warn "could not get port status\n"; using || warn ... forces $PortObj->status to scalar context, so that only the first element of the array on the LHS gets set (always to 4, being the length of the status array), with the other 3 elements remaining undef. Using'or' instead of '||' fixes this, i.e.: =head2 Operating Methods ($BlockingFlags, $InBytes, $OutBytes, $LatchErrorFlags) = $PortObj->status or warn "could not get port status\n"; Kind regards, Chris