On Tue Jul 22 12:18:59 2014, demerphq wrote: > On 22 July 2014 21:14, Eric Brine <ikegami@adaelis.com> wrote: > > > On Mon, Jul 21, 2014 at 12:08 PM, demerphq <demerphq@gmail.com> wrote: > > > >> The part I consider the most serious bug is that srand(()) or sleep(()) > >> are treated the same as srand(undef) or sleep(undef). That is an empty > >> list, it should not be treated as a value. > >> > > > > >perl -E"say prototype 'CORE::sleep'" > > ;$ > > > > It's Perl's stupid prototypes. ($) means "one argument evaluated in scalar > > context", so (;$) means "no arguments or one evaluated in scalar context". > > > > >perl -E"sub x(;$) { say 0+@_; } x(());" > > 1 > > > > A stub in scalar context is undef. > > > > >perl -MDevel::Peek -e"$x = (); Dump($x);" > > SV = NULL(0x0) at 0x229240 > > REFCNT = 1 > > FLAGS = () > > > > > Interesting. Thanks. That does make sense, in a sad way. I see no other way for this to work. Can we close this as not-a-bug? -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=122351Thread Previous