-
Notifications
You must be signed in to change notification settings - Fork 589
Closed
Labels
Closable?We might be able to close this ticket, but we need to check with the reporterWe might be able to close this ticket, but we need to check with the reporter
Description
When assigning to a hash, an even-sized list is required. If an odd-sized list is presented, perl prints a warning:
my %h = (1, 2, 3);
Odd number of elements in hash assignment at (eval 7) line 1.
The new n-at-a-time foreach
syntax never gives a warning in similar circumstances:
use experimental 'for_list'; foreach my ($k, $v) (1,2,3) {}
# no warning
Perhaps it should? It can't be worded quite the same way, because "odd vs even" is only a useful concept for n=2. But perhaps some wording such as:
Insufficient elements for final bundle of foreach list at ...
Metadata
Metadata
Assignees
Labels
Closable?We might be able to close this ticket, but we need to check with the reporterWe might be able to close this ticket, but we need to check with the reporter