summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen McCamant <smcc@mit.edu>1998-07-21 12:06:23 -0500
committerGurusamy Sarathy <gsar@cpan.org>1998-07-22 02:51:13 +0000
commit407eff0f25e20d3ed6ccfe2097b366fd28d8e3c4 (patch)
tree160430780366485bc1ab3ad43868498b6a7a0e75
parent0ebe003824736fdbe73467ef153a40f1d6fc4b92 (diff)
downloadperl-407eff0f25e20d3ed6ccfe2097b366fd28d8e3c4.tar.gz
applied patch, modulo parts already added to perldelta
Message-Id: <13749.3106.995764.413053@alias-2.pr.mcs.net> Subject: [PATCH] Re: Beta2 is available p4raw-id: //depot/perl@1620
-rw-r--r--pod/perldelta.pod30
1 files changed, 24 insertions, 6 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 621368520b..659cb2f862 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -155,9 +155,9 @@ because all reentrancy of the runtime is handled using a "stack of stacks".
This should improve reliability of cached stack pointers in the internals
and in XSUBs.
-=head2 Behavior of local() on composites is now well-defined
+=head2 Behavior of local() on array and hash elements is now well-defined
-See L<perlfunc/local>.
+See L<perlsub/"Temporary Values via local()">.
=head2 C<%!> is transparently tied to the L<Errno> module
@@ -171,10 +171,6 @@ See L<perlref>.
See L<perlsyn>.
-=head2 Slice notation on glob elements is supported
-
-[XXX See what?]
-
=head2 Keywords can be globally overridden
See L<perlsub>.
@@ -277,6 +273,28 @@ Splice() with a negative LENGTH argument now work similar to what the
LENGTH did for substr(). Previously a negative LENGTH was treated as
0. See L<perlfunc/splice>.
+=head2 Magic lvalues are now more magical
+
+When you say something like C<substr($x, 5) = "hi">, the scalar returned
+by substr() is special, in that any modifications to it affect $x.
+(This is called a 'magic lvalue' because an 'lvalue' is something on
+the left side of an assignment.) Normally, this is exactly what you
+would expect to happen, but Perl uses the same magic if you use substr(),
+pos(), or vec() in a context where they might be modified, like taking
+a reference with C<\> or as an argument to a sub that modifies C<@_>.
+In previous versions, this 'magic' only went one way, but now changes
+to the scalar the magic refers to ($x in the above example) affect the
+magic lvalue too. For instance, this code now acts differently:
+
+ $x = "hello";
+ sub printit {
+ $x = "g'bye";
+ print $_[0], "\n";
+ }
+ printit(substr($x, 0, 5));
+
+In previous versions, this would print "hello", but it now prints "g'bye".
+
=head1 Supported Platforms