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
%stash:: = () anonymises CVs #10826
Comments
From @cpansproutCurrently, a stash loses its name temporarily during hv_clear. As a result, when a subroutine whose GV is in that stash has a reference elsewhere, its GV pointer is replaced with a pointer to an __ANON__ GV whose stash pointer points to the __ANON__ package. In order to fix another bug, I tried changing hv_clear such that the name is always visible, but there are tests for that anonymisation that fail as a result (in t/op/stash.t): $sub = do { isa_ok( $gv, "B::GV", "cleared stash leaves CV with valid GV"); That last is() does not seem right to me. May I change it? This is getting in the way of about three bug fixes. Also, there are to-do tests to check that either stashes lose their names after %stash::=() or that anonymous subs with ->GV->STASH pointing to %stash:: will have it redirected to %__ANON__::. I think those should change, too. Flags: Site configuration information for perl 5.13.6: Configured by sprout at Thu Nov 11 04:29:30 PST 2010. Summary of my perl5 (revision 5 version 13 subversion 6) configuration: Locally applied patches: @INC for perl 5.13.6: Environment for perl 5.13.6: |
From @demerphqOn 14 November 2010 22:43, Father Chrysostomos
I think you can, but this has to be prominent in the changes file. The advantage of having named anonymous subs IMO massively outweighs IOW, i think the only code that cares about this name is code that Yves -- |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Sun, Nov 14, 2010 at 01:43:05PM -0800, Father Chrysostomos wrote:
I think those tests were more concerned with checking that the STASH %two:: = (); should be semantically equivalent to delete $two::{$_} for keys %two::; and indeed if you substitute that in stash.t, the test fails. There does however need to be a clear distinction between clearing -- |
From @cpansproutFixed in 2d0d1ec. |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#79208 (status was 'resolved')
Searchable as RT79208$
The text was updated successfully, but these errors were encountered: