This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Propagate calling context for do '...'
authorGisle Aas <gisle@aas.no>
Wed, 4 Apr 2001 20:17:29 +0000 (13:17 -0700)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 5 Apr 2001 22:54:17 +0000 (22:54 +0000)
Message-ID: <lrg0fo827q.fsf@caliper.ActiveState.com>

p4raw-id: //depot/perl@9579

pod/perlfunc.pod
pp_ctl.c

index aafc197..4e7f1a9 100644 (file)
@@ -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
index 90c6a3c..272f506 100644 (file)
--- 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)