diff options
author | Stephen McCamant <alias@mcs.com> | 1997-06-15 21:23:45 +1200 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1997-08-07 00:00:00 +1200 |
commit | 706a304b44357647b233945e4e432234718ab515 (patch) | |
tree | 3ba80bbbfc7a21f4e239b1548dc9c3ba91ef06f5 /pod | |
parent | 21fc060b433a5fd003b9aca5789342207c46ada4 (diff) | |
download | perl-706a304b44357647b233945e4e432234718ab515.tar.gz |
Band-aid fix for local([@%]$x)
This fixes the segfaults by extending the prohibition on `local($$x)'
to array and hash dereferences and removing the code that never
worked. It also adds simple test cases and a `through' to the error
message.
The new explanation in perldiag isn't terribly clear, but the old one
told an untruth.
It should be possible to make local([$@%]$x) work by adding a new
SAVEt type, and I'd like to do so in the future, but that certainly
wouldn't be maintenance patch material.
p5p-msgid: m0wsb7J-000EYPC@alias-2.pr.mcs.net
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perldiag.pod | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 1b0f92e31f..a5527ddd82 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -597,12 +597,12 @@ call for another. It can't manufacture one out of whole cloth. In general you should be calling it out of only an AUTOLOAD routine anyway. See L<perlfunc/goto>. -=item Can't localize a reference +=item Can't localize through a reference -(F) You said something like C<local $$ref>, which is not allowed because -the compiler can't determine whether $ref will end up pointing to anything -with a symbol table entry, and a symbol table entry is necessary to -do a local. +(F) You said something like C<local $$ref>, which Perl can't currently +handle, because when it goes to restore the old value of whatever $ref +pointed to after the scope of the local() is finished, it can't be +sure that $ref will still be a reference. =item Can't localize lexical variable %s |