summaryrefslogtreecommitdiff
path: root/pod/perldelta.pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1997-12-06 00:25:07 -0500
committerGurusamy Sarathy <gsar@cpan.org>1997-12-23 21:09:32 +0000
commitc7cc6f1c203c4e65db1c0f5cee7626570fbf65fd (patch)
tree451855502d0858b54eb708f31f21fbb50e81a8e7 /pod/perldelta.pod
parent53868620ef784266377b575754b281428137c6b0 (diff)
downloadperl-c7cc6f1c203c4e65db1c0f5cee7626570fbf65fd.tar.gz
[win32] Trivial bugfix#2 from local repository
Message-Id: <199712061025.FAA14396@aatma.engin.umich.edu> Subject: Re: eval of sub gives spurious "uninitialised" warning p4raw-id: //depot/win32/perl@382
Diffstat (limited to 'pod/perldelta.pod')
-rw-r--r--pod/perldelta.pod17
1 files changed, 17 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 7400940dca..5c99211e62 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -169,6 +169,23 @@ also return the undefined value if a subroutine's return value will
not be used at all, which allows subroutines to avoid a time-consuming
calculation of a return value if it isn't going to be used.
+=head2 C<eval EXPR> determines value of EXPR in scalar context
+
+Perl (version 5) used to determine the value of EXPR inconsistently,
+sometimes incorrectly using the surrounding context for the determination.
+Now, the value of EXPR (before being parsed by eval) is always determined in
+a scalar context. Once parsed, it is executed as before, by providing
+the context that the scope surrounding the eval provided. This change
+makes the behavior Perl4 compatible, besides fixing bugs resulting from
+the inconsistent behavior. This program:
+
+ @a = qw(time now is time);
+ print eval @a;
+ print '|', scalar eval @a;
+
+used to print something like "timenowis881399109|4", but now (and in perl4)
+prints "4|4".
+
=head2 Changes to tainting checks
A bug in previous versions may have failed to detect some insecure