New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hash tied-ness doesn't local() #3561
Comments
From anders@broadcom.comWhen you local() a tied hash, the tied-ness of the hash is not occluded. This means the old variable is completely invisible via the Since the actual behavior seems stable (also observed in 5.6.0 and @9073), Here's a test that expects perl to work according to the man page: ----- BEGIN t/lib/tiestdhash.t ----- #!./perl -w BEGIN { use strict; use vars qw/%a %b/; tie %b, 'Tie::StdHash'; $a{Z}=1; ----- END t/lib/tiestdhash.t ----- Site configuration information for perl 5.00503: Configured by root at Fri Jun 16 10:37:29 PDT 2000. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: |
2 similar comments
From anders@broadcom.comWhen you local() a tied hash, the tied-ness of the hash is not occluded. This means the old variable is completely invisible via the Since the actual behavior seems stable (also observed in 5.6.0 and @9073), Here's a test that expects perl to work according to the man page: ----- BEGIN t/lib/tiestdhash.t ----- #!./perl -w BEGIN { use strict; use vars qw/%a %b/; tie %b, 'Tie::StdHash'; $a{Z}=1; ----- END t/lib/tiestdhash.t ----- Site configuration information for perl 5.00503: Configured by root at Fri Jun 16 10:37:29 PDT 2000. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: |
From anders@broadcom.comWhen you local() a tied hash, the tied-ness of the hash is not occluded. This means the old variable is completely invisible via the Since the actual behavior seems stable (also observed in 5.6.0 and @9073), Here's a test that expects perl to work according to the man page: ----- BEGIN t/lib/tiestdhash.t ----- #!./perl -w BEGIN { use strict; use vars qw/%a %b/; tie %b, 'Tie::StdHash'; $a{Z}=1; ----- END t/lib/tiestdhash.t ----- Site configuration information for perl 5.00503: Configured by root at Fri Jun 16 10:37:29 PDT 2000. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: |
From @muirStill present in 5.8.3. On the other hand, tie my %x, 'Tie::Hash'; should not work. I haven't tried it :-) |
From @gannett-ggreerOn Mon Mar 12 11:01:51 2001, anders@broadcom.com wrote:
IIRC, DaveM made it explicit recently that scalars keep tie under local Could you weigh in on whether this bug report should be therefore -- |
From @iabynYes, it was a bug in perl that's been fixed in 5.13.1 |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#6017 (status was 'resolved')
Searchable as RT6017$
The text was updated successfully, but these errors were encountered: