From: Gisle Aas Date: Wed, 4 Apr 2001 20:17:29 +0000 (-0700) Subject: Propagate calling context for do '...' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=986b19de108d7d28065c88eb6f0409b17efc8482;p=p5sagit%2Fp5-mst-13.2.git Propagate calling context for do '...' Message-ID: p4raw-id: //depot/perl@9579 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index aafc197..4e7f1a9 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -1117,7 +1117,7 @@ from a Perl subroutine library. is just like - scalar eval `cat stat.pl`; + eval `cat stat.pl`; except that it's more efficient and concise, keeps track of the current filename for error messages, searches the @INC libraries, and updates diff --git a/pp_ctl.c b/pp_ctl.c index 90c6a3c..272f506 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -3022,7 +3022,7 @@ PP(pp_require) char *tryname; SV *namesv = Nullsv; SV** svp; - I32 gimme = G_SCALAR; + I32 gimme = GIMME_V; PerlIO *tryrsfp = 0; STRLEN n_a; int filter_has_file = 0; @@ -3360,7 +3360,7 @@ trylocal: { PL_eval_owner = thr; MUTEX_UNLOCK(&PL_eval_mutex); #endif /* USE_THREADS */ - return DOCATCH(doeval(G_SCALAR, NULL)); + return DOCATCH(doeval(gimme, NULL)); } PP(pp_dofile)