From: Mike Guy Date: Fri, 10 Dec 2004 19:08:01 +0000 (+0000) Subject: Re: [perl #2562] wantarray fails in END, INIT, and CHECK blocks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=20f13e4aa04ece013e593e83cc50c8d459eaa7a7;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #2562] wantarray fails in END, INIT, and CHECK blocks Message-ID: p4raw-id: //depot/perl@23639 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 76fd640..dec40d7 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -6731,7 +6731,7 @@ and for other examples. =item wantarray Returns true if the context of the currently executing subroutine or -eval() block is looking for a list value. Returns false if the context is +C is looking for a list value. Returns false if the context is looking for a scalar. Returns the undefined value if the context is looking for no value (void context). @@ -6739,6 +6739,10 @@ looking for no value (void context). my @a = complex_calculation(); return wantarray ? @a : "@a"; +C's result is unspecified in the top level of a file, +in a C, C, C or C block, or in a C +method. + This function should have been named wantlist() instead. =item warn LIST