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
Globs in tied scalars can be reified if STORE dies #10626
Comments
From @cpansproutAnother regression in 5.13, this one caused by 0fe688f. Some of these patch authors are clueless! #!perl -l In 5.12 and earlier this prints "bar". In 5.13.4 the penultimate line dies with "No!", because it’s still tied. This is because of the order of these statements in pp_sassign is wrong: /* Allow glob assignments like *$x = ..., which, when the glob has a Turning the fake flag back on should happen before magic is called. If bug #77810 is fixed, we can simply revert the patch that caused this, and put the appropriate logic in one place. This same bug also affects a patch I wrote for #77508 (list assignment to dereferenced fake glob). Here is the example script again, with more explanatory notes: #!perl -l # Now the $a scalar holds a copy of *foo; i.e., a PVGV with the FAKE flag eval { *$a = sub{} }; eval { $a = undef }; # Untie the variable. Since there is a glob, it tries to untie the IO slot, # We are supposedly assigning "bar" to an innocent $a variable, but in # We never get here. print $a; At this point (suppose all the above was in an eval), even if the FETCH routine starts returning undef, it will always be the glob that is returned to the calling code. This would make it rather difficult to implement read-only aliases using ties. |
From @cpansproutOn Sun Sep 12 12:41:24 2010, sprout wrote:
|
@cpansprout - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#77812 (status was 'resolved')
Searchable as RT77812$
The text was updated successfully, but these errors were encountered: