Re: [perl #61610] Something is inconsistent with the undef warnings of .reduce

2008-12-22 Thread Vasily Chekalkin
Mark J. Reed wrote: Arity 2 and a 1-elem list seems to be special-cased; otherwise, it consistently warns once per undefined value in the expansion: 1-elem List reduce patch attached. Test added in r24567 -- Bacek commit 9c1a3058064067dacab4c5f623a59ae768f19182 Author: Vasily Chekalkin Date:

Re: [perl #61610] Something is inconsistent with the undef warnings of .reduce

2008-12-22 Thread Mark J. Reed
Ok, so with that patch, the case of a 1-element list and a binary sub now behaves the same as any other combination of arity n with a list whose length is not k(n-1)+1. I guess that's progress. :) Thanks, Vasily. I'd still like to see the undef warnings reduced to one, rather than one for every

Re: [perl #61610] Something is inconsistent with the undef warnings of .reduce

2008-12-22 Thread Mark J. Reed
Arity 2 and a 1-elem list seems to be special-cased; otherwise, it consistently warns once per undefined value in the expansion: (1..4).reduce({$^a+$^b+$^c+$^d})# no warnings (1..5).reduce({$^a+$^b+$^c+$^d})# two warnings: (1+2+3+4)+5+undef+undef (1..6).reduce({$^a+$^b+$^c+$^d})# one w

[perl #61610] Something is inconsistent with the undef warnings of .reduce

2008-12-22 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #61610] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61610 > rakudo: say (1..10).reduce({$^a + $^b + $^c}) rakudo 34244: OUTPUT[Use of uninitialize