Skip Menu |
Report information
Id: 121058
Status: open
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: zefram [at] fysh.org
Cc:
AdminCc:

Operating System: Linux
PatchStatus: (no value)
Severity: low
Type: core
Perl Version: 5.14.2
Fixed In: (no value)



Subject: "local"/"my"/"our" inconsistent scope
To: perlbug [...] perl.org
From: zefram [...] fysh.org
Date: Wed, 22 Jan 2014 13:34:11 +0000
CC: zefram [...] fysh.org

Message body is not shown because it is too large.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 727b
On Wed Jan 22 05:34:41 2014, zefram@fysh.org wrote: Show quoted text
> > This is a bug report for perl from zefram@fysh.org, > generated with the help of perlbug 1.39 running under perl 5.14.2. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > In playing around with signatures, Ilmari on IRC noticed some funny > behaviour that boils down to different effects of local/my/our having > different scopes. For example: > > $ perl -lwe '$aaa=111; $bbb=222; { my(local our $aaa, $bbb) = > (333,444); print "$::aaa $::bbb"; } print "$::aaa $::bbb"' > 333 444 > 111 444 >
Fixed in blead by commit f3106bc89eb4bbffee5ca7cb67bd63d2f3ce87bf. This makes nested declarations an error.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org