On 22 October 2014 06:44, Father Chrysostomos via RT <
perl...@perl.org> wrote:
> On Tue Jul 22 12:18:59 2014, demerphq wrote:> > On 22 July 2014 21:14, Eric Brine <ikeg...@adaelis.com> wrote:> >> > > On Mon, Jul 21, 2014 at 12:08 PM, demerphq <deme...@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?>>
We could remove the unnecessary prototype.
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"